Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Critical
-
Resolution: Fixed
-
Component/s: workflow-cps-plugin
-
Labels:
-
Environment:Jenins 1.613, Workflow plugin 1.6
Also: Jenkins 1.651.1, workflow-job 2.3
-
Similar Issues:
Description
When selecting the "Groovy CPS DSL from SCM" option for a worflow job, the SCM plugins do not appear to resolve build parameters or environment variables. I am using the git plugin and when I use it from other jobs I can specify a build parameter, like "BuildBranch", and use that when specifying what branch should be built:
Branches to build: */${BuildBranch}
This does not work when I use the Groovy CPS DSL from SCM.
Attachments
Issue Links
- depends on
-
JENKINS-30910 Job parameters should be exposed as environment variables
-
- Resolved
-
- is duplicated by
-
JENKINS-33719 PipelineScript from SCM does not support job parameters
-
- Resolved
-
-
JENKINS-42971 Pipeline script from SCM does not expand build parameters/env variables for lightweight checkouts
-
- Resolved
-
-
JENKINS-34540 Can't use Pipeline Parameter in Branch Specifier on Jenkins 1.651.2/2.0-2.6
-
- Closed
-
-
JENKINS-34126 Jenkins 2.x - Pipeline - variables from paramaetrized build not evaluated for Git
-
- Closed
-
-
JENKINS-34876 Git Parameters not working for Pipeline projects and Jenkinsfile from SCM
-
- Resolved
-
- is related to
-
JENKINS-48431 Pipeline script from SCM should support build parameters using Lightweight checkout
-
- Open
-
- relates to
-
JENKINS-42836 Build parameter not expanded in script path
-
- Resolved
-
-
JENKINS-43040 Pipeline script from SCM does not resolve project parameter used in branch specifier
-
- Resolved
-
- links to
I have a jenkins installation which was set up in 2019. A job for building releases has a build parameter TAG_NAME. This variable is used as branch specifier
in the "Pipelinescript from SCM" git section and i have "lightweight checkout" activated. (it didn't work btw. telling me that it is falling back to full checkout)
Until yesterday, it worked flawlessly, the variable was resolved correctly and the corresponding tag was checked out.
Then i updated a bunch of plugins and restarted jenkins. Then the variable wasn't resolved any more. Only unchecking the "lighweight checkout" option helped.
How could this have worked for me before if this problem is already so old?
Could it be that now with the updated plugins i would actually get a "lightweight" checkout and therefore the variable resolution doesn't work?