I'm talking about a build job that is parameterized. The parameter is of type "run parameter". Jenkins creates variables with names that cannot be used in a pre-step shell script. Quite annoying.
On Saturday, November 17, 2012 11:56:40 PM UTC+1, r2_ wrote: > > Hey, > > Checkout the environmental variable here: > https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project > Short answer: > echo ${JOB_NAME} > echo ${BUILD_NUMBER} > > > On Friday, November 16, 2012 3:39:26 PM UTC-5, Martin Lichtin wrote: >> >> Hi >> For a parameterized build with one "run parameter" (let's name it X), >> Jenkins set three environment variables. >> >> X >> X.jobName >> X.number >> >> How can the latter two be used in a pre-step shell script? >> Bash cannot handle environment variables containing a dot, it seems. >> >> $ echo ${X.jobName} >> bash: ${X.jobName}: bad substitution >> >>