You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CI integration: allow adding [skip ci] to semantic-release commit #153
We've successfully implemented semantic-release in our Gitlab CI workflow on the master-release branch, passing GL_TOKEN through as a protected variable.
There's a minor inconvenience, when semantic-release pushes the new version to the branch within the CI job, it'll trigger the pipeline again (resulting in one needless CI run).
As far as I know, semantic-release allows making use of the [skip ci] flag in semantic-release commit. I wonder if this is the only solution - then maybe it would make sense allowing to set a flag --skip-ci to python-semantic-release which would add [skip ci] to the version commit (or, even better, using ci.skip flag in the git push, not messing up commit messages). Maybe it would even make sense passing this flag by default, since the version-commit will likely have no new code.
Well, that was fast: there's a gitlab featureonly:changes/except:changes (considered alpha) that allows skipping pipelines for certain files in gitlab-ci.yml, e.g. if semantic-release version variable is set to .version:__version__ then the following gitlab-ci entry will skip the pipeline for changes to this file:
except:
changes:
- .version
Yay!
I'll leave this open for any comments, please feel free to close it as solved!
It'll trigger the pipeline again (resulting in one needless CI run).
Considering this needless is kind of subjective I think. Running the CI job is required to get the a green build for the tag for some combinations of CI and VCS hosting.
I am open to have an option that adds [skip ci] to the commit message, but it needs to be optional and of by default.
Yes, I agree - there may be applications that I am not aware of that need CI every time, even if just on a version upgrade. Also, with the except-changes we have a solution that works for us. Many thanks for the explanation! So, I'll close this - anyone interested may still continue adding comments..
Activity
Sieboldianus commentedon Oct 24, 2019
Well, that was fast: there's a gitlab feature
only:changes/except:changes(considered alpha) that allows skipping pipelines for certain files in gitlab-ci.yml, e.g. if semantic-release version variable is set to.version:__version__then the following gitlab-ci entry will skip the pipeline for changes to this file:Yay!
I'll leave this open for any comments, please feel free to close it as solved!
relekang commentedon Oct 24, 2019
Considering this needless is kind of subjective I think. Running the CI job is required to get the a green build for the tag for some combinations of CI and VCS hosting.
I am open to have an option that adds [skip ci] to the commit message, but it needs to be optional and of by default.
Sieboldianus commentedon Oct 24, 2019
Yes, I agree - there may be applications that I am not aware of that need CI every time, even if just on a version upgrade. Also, with the
except-changeswe have a solution that works for us. Many thanks for the explanation! So, I'll close this - anyone interested may still continue adding comments..gabrielSoudry commentedon Feb 7, 2022
For those who would be interested (I had trouble finding this information) in gitlab you could use this to skip the CI :
[Skip Ci] Skip CI on commit release
louison commentedon Jan 20, 2023
Works also like a charm on Google Cloud Build