Open Cynical-Optimist opened 3 years ago
See original issue on GitLab In GitLab by [Gitlab user @BenjaminSchubert] on Dec 4, 2019, 17:24
With the new version of Gitlab, we now have a rules section that allows us to use conditionals.
rules
We could use this to reduce the amount of duplication in the CI, by merging wsl non-master and master, and the same for windows jobs.
Something like:
rules: - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH' - when: manual
would help.
However, the implementation is currently suboptimal, and needs to be fixed. https://gitlab.com/gitlab-org/gitlab/issues/34756 to track upstream
In GitLab by [Gitlab user @juergbi] on Dec 5, 2019, 11:10
An alternative could be to create templates/anchors for WSL and Win32. Less elegant than rules but also reduces the duplication of the main parts.
See original issue on GitLab In GitLab by [Gitlab user @BenjaminSchubert] on Dec 4, 2019, 17:24
Summary
With the new version of Gitlab, we now have a
rules
section that allows us to use conditionals.We could use this to reduce the amount of duplication in the CI, by merging wsl non-master and master, and the same for windows jobs.
Something like:
would help.
However, the implementation is currently suboptimal, and needs to be fixed. https://gitlab.com/gitlab-org/gitlab/issues/34756 to track upstream