As per source code in build.rb:
def action? self.when == 'manual' end variables << { key: "CI_JOB_MANUAL", value: 'true', public: true } if action? so only when when equals manual the CI_JOB_MANUAL is set to true it seam On Wednesday, June 14, 2017 at 3:24:56 PM UTC+2, Michael Remiš wrote: > > Hi there, > > I was trying to use CI_JOB_MANUAL variable in my gitlab CI configuration, > but its meaning is little bit confusing. > > From documentation (https://docs.gitlab.com/ce/ci/variables/README.html): > CI_JOB_MANUAL 8.12 all The flag to indicate that job was manually started > But if I put someting like "echo $CI_JOB_MANUAL" in my script section in > .gitlab-ci.yml: > 1) when job is configured as "when: manual" it is always printed true > 2) when job is NOT configured as "when: manual" it is always printed false > (resp. nothing) even if I run job manually using GitLab UI > > > In my opinion, "The flag to indicate that job was manually started" means > actual value independent of what is configured in "when" section. > > In addition current meaning is useless as I always know what value I > actually have in "when" section... > > > Any idea how to detect how job was actually triggered? > > Thanks for discussion. > > -- You received this message because you are subscribed to the Google Groups "GitLab" group. To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/3639b49e-bf7f-423f-9411-1db23480d11b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.