CI: Enable/Disable jobs based on repo's fork status
Hi there -
Something we recently started doing internally is having 2 copies of each repo within GitLab - one for the dev team to use, then the testing/QA team will issue merge requests to the production copy of the repo, which uses gitlab-ci.yml to build and deploy code to production. The dev team's repo is a fork of the production repo.
I'd be really useful to state which jobs should be run on which fork. For example, it'd be useful to run automated tests/code quality tests on the dev team's repository when the push to different branches. These tests take some time, though, so I'd rather not run them after accepting a merge request (since they've been run already). And the other side of the coin - when the dev team syncs their repo's master branch from the upstream repo, I don't want any of the deployment jobs to run (we run deployment jobs when commits are pushed to the master branch).
I think there's a few ways to accomplish this - gitlab-foss#18468 (closed) would help, but I'd love to have some variable indicating if there's a parent/upstream/source repo.