Reputation: 4029
Until now I'm using gitlab-ci job to deploy in prod with when: manual
but I recently have requirement to auto-deploy in prod when schedule job is running (that will add specific variable)
Thus I changed when: manual
with rules
keyword as following:
rules:
# deploy if schedule is triggered and thus variable is present
- if: '$DEPLOYMENT_SCHEDULE == "true"'
when: always
# Else (if master branch) keep job as manual (as before)
- if: '$CI_COMMIT_REF_NAME == "master"'
when: manual
However the pipeline view has changed a bit, because:
when: manual
, pipeline is considered as passedrules:
(when merge on master without DEPLOYMENT_SCHEDULE
), pipeline is considered as blockedIs there something I miss? How can I have same pipeline result with rules
keyword?
Upvotes: 9
Views: 1793
Reputation: 41
@kakawait I believe there's a bug report open on this issue at https://gitlab.com/gitlab-org/gitlab/issues/30075
What is the current bug behavior?
Shows the pipeline status as skipped even though the only job included is a manual action.
What is the expected correct behavior?
The pipeline status should reflect the manual action status.
Upvotes: 2