Open peterbbeu opened 1 year ago
Rename this issue to "workflow rules variables".
I'll add the label "feature request", it's not related to #685 in any way.
You just stumpled upon a missing feature.
Rename this issue to "workflow rules variables".
I have done so, thank you. It felt kind of similar, but I guess not ;)
This one would be really nice to have. My use case:
workflow:
rules:
...
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/
variables:
IS_TAGGED_RELEASE: "true"
publish:
rules:
- if: $IS_TAGGED_RELEASE
Thank you for the fantastic tool!
Note: possibly related to #685, I hoped this would fix it, but it doesn't seem to have (I tried by building latest from master)
Minimal .gitlab-ci.yml illustrating the issue I made a minimal test case here, but I'll replicate it below: https://github.com/peterbbeu/gitlab-ci-local-testcase/tree/3926892
The output of gitlab-ci-local can be seen here: https://github.com/peterbbeu/gitlab-ci-local-testcase/actions/runs/3685068421/jobs/6235567395
.gitlab-ci.yml
Expected behavior See these two pipelines: Branch: https://gitlab.com/petervv/gitlab-ci-test/-/jobs/3465834365 Tag: https://gitlab.com/petervv/gitlab-ci-test/-/jobs/3465838409
I expect
$IS_TAG_BUILD
to be either 0 or 1 like on gitlab itself. Ingitlab-ci-local
currently it's unset, like this:Host information Ubuntu 22.04 gitlab-ci-local 4.36.1 (latest build from git)
Additional context See also #685 (?)