Add only/except: wip_merge_requests
The job configuration only/except for merge requests should also be able to distinguish between WIP / non-WIP merge requests:
lengthy job consuming a ton of CI resources:
only:
- merge_requests
except:
- wip_merge_requests
script:
- echo "This takes a long time and thus we don't waste resources for WIP merge requests"
smaller test job:
only:
- merge_requests
script:
- echo "This runs for all merge requests"
The usecase is the following:
- Your team has a very extensive, resource-demanding test parcours which should not run prematurely for every trivial commit
- In fact, 1. is the reason why your team uses
only: merge_requests
and voila - your testing speed improved because your runners can concentrate on the actually relevant jobs - But unluckily, your team has designed its process to start with opening a "Work in Progress" Merge Requests as soon as they start on a new issue (e.g. because this allows easier overview about what is currently going on, easier context switching, easier discussion about not finished features,...).
- As soon as the MR's are ready for thorough review, your team removes "WIP" from the merge requet
- This means,
only: merge_requests
is effectively useless because you almost always commit to a MR.
So this could be easily solved if one could write
Proposal 1
only: merge_requests
except: wip_merge_requests
-
merge_requests
Job runs for all merge requests, like it currently does. -
wip_merge_requests
Job only runs for MR prefixed with WIP
or (depending on Gitlab's choice of keywords and implementation)
Proposal 2
only: non_wip_merge_requests
-
merge_requests
Job runs for all merge requests, like it currently does. -
wip_merge_requests
Job only runs for MR prefixed with WIP -
non_wip_merge_requests
Job only runs for MR not prefixed with WIP
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.