3 ms·
In GitLab CI, we solve this by using the pipeline number in the tag. They're always in order, and it is available as a variable anywhere in the pipeline.
by kube-system 7y ago
In GitLab CI, we solve this by using the pipeline number in the tag. They're always in order, and it is available as a variable anywhere in the pipeline.
- GordonS 7y agoI do the same thing with Azure DevOps, as pipelines there also have an incrementing integer ID
- stepbeek 7y agoNeat! We're using gitlab too and I never thought about this.
- kube-system 7y agoIt's $CI_PIPELINE_ID if you want to try it out.
- cytzol 7y agoI do this as well — "Upgrade from image b1257 to b1262". As a bonus, you can tell every tag that doesn't fit the b-then-a-build-number naming convention hasn't come from CI.
- oweiler 7y agoWe use `git rev-list --count HEAD` on master, which basically gives you the number of commits.
- lvncelot 7y agoOh, I need to start doing that, that's really clever.