Skip to content
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)

Submitting the PR to the testing repository

Add gitlab as a remote

Create a remote for the GitLab test repository if it does not yet exist.

git remote add gitlab git@gitlab.gfdl.noaa.gov:ogrp/MOM6

Fetch the GitHub pull request

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}.

Instigate tests

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.

Setup to fetch all pull requests:

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 = git@github.com: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