Hi, Is there a way, through with i can pass a value to the job and use it in the job ? I want to send the branch name from pipeline, which can be used in the job to build , is it possible?
the branch name should be available with the workspace env env.BRANCH_NAME
env.BRANCH_NAME
I have a few jobs where I use it to only allow triggered jobs if the branch is master.
if (env.BRANCH_NAME == 'master') props.add(pipelineTriggers([ parameterizedCron(''' H 19 * * * %param=value ''')])) properties(props)
Hi, I believe that BRANCH_NAME is only populated when running a multi-branch pipeline. FYI then. thanks Gustavo.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, Is there a way, through with i can pass a value to the job and use it in the job ? I want to send the branch name from pipeline, which can be used in the job to build , is it possible?
the branch name should be available with the workspace env
env.BRANCH_NAME
I have a few jobs where I use it to only allow triggered jobs if the branch is master.
Hi, I believe that BRANCH_NAME is only populated when running a multi-branch pipeline. FYI then.
thanks
Gustavo.