forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 60
Developer workflow
Marshall Ward edited this page Jul 23, 2019
·
6 revisions
This are an incomplete sketch of instructions for developers at GFDL. Not particularly relevant for non-GFDL users.
You can also read a fuller explanation of the Testing pipeline (gitlab)
Create a remote for the GitLab test repository if it does not yet exist.
git remote add gitlab [email protected]:ogrp/MOM6
git fetch origin pull/${ID}/head:pr/${ID}
where ${ID}
is the pull request ID. This will create a new local branch named pr/${ID}
.
We now switch to this branch and push it onto the remote GitLab repository.
git checkout pr/${ID}
git push gitlab
The tests for pr/${ID}
will start automatically.
The repository can be configured so that git fetch
will pull all GitHub PRs as branches.
To enable this, edit the config
file under .git/
for MOM6. If you have a recursive clone it might be under .git/modules/src/MOM6/config
:
You should see a block that looks like
[remote "origin"]
url = [email protected]:NOAA-GFDL/MOM6.git
fetch = +refs/heads/*:refs/remotes/origin/*
add the line
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
git fetch [origin]
git checkout pr/142
git push gitlab pr/142