We converted out freestyle jobs to pipeline jobs using "Pipeline script from SCM". The Git branch field for the Jenkinsfile to load cannot expand a property which comes from a property file, which name is entered in "Properties File Path". I can however expand a property entered in "Property Content". The properties file is correct because we successfully used to populate the Git branch field for our previous freestyle jobs.
"Lightweight checkout" checkbox is unchecked.
A related (solved) issue is JENKINS-42971.
- is related to
-
JENKINS-42971 Pipeline script from SCM does not expand build parameters/env variables for lightweight checkouts
-
- Resolved
-
We have same problem, but in our case we don't have readTrusted
But we are using kubernetes with kubernetes-plugin, and we were using yaml file for pod configuration
agent { kubernetes { yamlFile "pod.yaml" } }
seems that underhood it calls readTrusted
we tried to use
agent { kubernetes { yaml readFile("./pod.yaml") } }
but this also didn't work
only inline pod yaml helped to solve this issue