jenkinsfile not passing env to shHow do I make Jenkins 2.0 execute a sh command in the same directory as the checkout?Get git branch name in Jenkins Pipeline/JenkinsfileJenkinsfile error- java.lang.NoSuchMethodError: No such DSL method 'withMaven' found among stepsWhere is jenkinsfile downloaded when job fetches pipeline script from SCMJenkins Pipeline “yarn install” command not foundcan not create file via Groovy code(or java code) in jenkinsfile of a pipeline job on Jenkinshow to fix npm: not found errorSed command not working in Jenkins PipelineJenkins pipeline fails with bad substitution error on file readAzure login with Jenkins pipeline

In the UK, is it possible to get a referendum by a court decision?

What exactly is ineptocracy?

What is an equivalently powerful replacement spell for the Yuan-Ti's Suggestion spell?

Getting extremely large arrows with tikzcd

How do conventional missiles fly?

Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?

Does Dispel Magic work on Tiny Hut?

Sums of two squares in arithmetic progressions

Are British MPs missing the point, with these 'Indicative Votes'?

How to show a landlord what we have in savings?

how do we prove that a sum of two periods is still a period?

How to find if SQL server backup is encrypted with TDE without restoring the backup

Should I tell management that I intend to leave due to bad software development practices?

What does the same-ish mean?

Could the museum Saturn V's be refitted for one more flight?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

How does a refinance allow a mortgage to be repaid?

Placement of More Information/Help Icon button for Radio Buttons

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

Send out email when Apex Queueable fails and test it

Implication of namely

Knowledge-based authentication using Domain-driven Design in C#

Car headlights in a world without electricity

What's the meaning of "Sollensaussagen"?



jenkinsfile not passing env to sh


How do I make Jenkins 2.0 execute a sh command in the same directory as the checkout?Get git branch name in Jenkins Pipeline/JenkinsfileJenkinsfile error- java.lang.NoSuchMethodError: No such DSL method 'withMaven' found among stepsWhere is jenkinsfile downloaded when job fetches pipeline script from SCMJenkins Pipeline “yarn install” command not foundcan not create file via Groovy code(or java code) in jenkinsfile of a pipeline job on Jenkinshow to fix npm: not found errorSed command not working in Jenkins PipelineJenkins pipeline fails with bad substitution error on file readAzure login with Jenkins pipeline













1















I am trying to set environment variable in Jenkinsfile following way,



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh '''
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
'''





post
failure
script
echo "Pipeline Failed"






But its failing with following error Bad substitution



[Pipeline] echo
0_2_0
[Pipeline] sh
+ echo Building
Building
/home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: 3: /home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: Bad substitution


Why I can't set ENV Var and use it in sh step ?










share|improve this question






















  • Inside the shell the syntax to access env vars is $BUILD_VERSION.

    – Brian Walker
    Mar 8 at 21:12











  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:16











  • Because that is incorrect syntax in sh. Just use echo $BUILD_VERSION in the shell section. The syntax in Jenkinsfile and the syntax in a shell script are different for accessing environment variables.

    – Brian Walker
    Mar 8 at 21:32












  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:39















1















I am trying to set environment variable in Jenkinsfile following way,



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh '''
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
'''





post
failure
script
echo "Pipeline Failed"






But its failing with following error Bad substitution



[Pipeline] echo
0_2_0
[Pipeline] sh
+ echo Building
Building
/home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: 3: /home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: Bad substitution


Why I can't set ENV Var and use it in sh step ?










share|improve this question






















  • Inside the shell the syntax to access env vars is $BUILD_VERSION.

    – Brian Walker
    Mar 8 at 21:12











  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:16











  • Because that is incorrect syntax in sh. Just use echo $BUILD_VERSION in the shell section. The syntax in Jenkinsfile and the syntax in a shell script are different for accessing environment variables.

    – Brian Walker
    Mar 8 at 21:32












  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:39













1












1








1








I am trying to set environment variable in Jenkinsfile following way,



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh '''
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
'''





post
failure
script
echo "Pipeline Failed"






But its failing with following error Bad substitution



[Pipeline] echo
0_2_0
[Pipeline] sh
+ echo Building
Building
/home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: 3: /home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: Bad substitution


Why I can't set ENV Var and use it in sh step ?










share|improve this question














I am trying to set environment variable in Jenkinsfile following way,



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh '''
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
'''





post
failure
script
echo "Pipeline Failed"






But its failing with following error Bad substitution



[Pipeline] echo
0_2_0
[Pipeline] sh
+ echo Building
Building
/home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: 3: /home/jenkins/jenkins_slave/workspace/Firmware/Branch/firmware@tmp/durable-54e04481/script.sh: Bad substitution


Why I can't set ENV Var and use it in sh step ?







jenkins jenkins-pipeline






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 21:09









royroy

1,36863078




1,36863078












  • Inside the shell the syntax to access env vars is $BUILD_VERSION.

    – Brian Walker
    Mar 8 at 21:12











  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:16











  • Because that is incorrect syntax in sh. Just use echo $BUILD_VERSION in the shell section. The syntax in Jenkinsfile and the syntax in a shell script are different for accessing environment variables.

    – Brian Walker
    Mar 8 at 21:32












  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:39

















  • Inside the shell the syntax to access env vars is $BUILD_VERSION.

    – Brian Walker
    Mar 8 at 21:12











  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:16











  • Because that is incorrect syntax in sh. Just use echo $BUILD_VERSION in the shell section. The syntax in Jenkinsfile and the syntax in a shell script are different for accessing environment variables.

    – Brian Walker
    Mar 8 at 21:32












  • echo $BUILD_VERSION prints empty in sh

    – roy
    Mar 8 at 21:39
















Inside the shell the syntax to access env vars is $BUILD_VERSION.

– Brian Walker
Mar 8 at 21:12





Inside the shell the syntax to access env vars is $BUILD_VERSION.

– Brian Walker
Mar 8 at 21:12













echo $BUILD_VERSION prints empty in sh

– roy
Mar 8 at 21:16





echo $BUILD_VERSION prints empty in sh

– roy
Mar 8 at 21:16













Because that is incorrect syntax in sh. Just use echo $BUILD_VERSION in the shell section. The syntax in Jenkinsfile and the syntax in a shell script are different for accessing environment variables.

– Brian Walker
Mar 8 at 21:32






Because that is incorrect syntax in sh. Just use echo $BUILD_VERSION in the shell section. The syntax in Jenkinsfile and the syntax in a shell script are different for accessing environment variables.

– Brian Walker
Mar 8 at 21:32














echo $BUILD_VERSION prints empty in sh

– roy
Mar 8 at 21:39





echo $BUILD_VERSION prints empty in sh

– roy
Mar 8 at 21:39












1 Answer
1






active

oldest

votes


















3














This is Jenkins thing I think. When you use the sh block with '; it will not have access to things like environment variables. Try using the " instead. That should work



sh """
echo "Building"
echo "$env.BUILD_VERSION"
echo "$env"
"""


Jenkins should recognise the shell block and escape the " within the """ automatically.



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh """
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
"""





post
failure
script
echo "Pipeline Failed"







My test case




pipeline 
agent
node
label 'devops-jenkins-slave'



options
timestamps()


stages

stage('Setup')
steps
dir("$WORKSPACE/")
script
BUILD_VERSION = "1"


sh """
echo "$BUILD_VERSION"
"""






post
always
dir("$WORKSPACE/")
deleteDir()







Result




Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on devops-jenkins-slave in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] timestamps
[Pipeline]
[Pipeline] stage
[Pipeline] (Setup)
[Pipeline] dir
22:09:55 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] script
[Pipeline]
[Pipeline]
[Pipeline] // script
[Pipeline] sh
22:09:56 [Test] Running shell script
22:09:56 + echo 1
22:09:56 1
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] (Declarative: Post Actions)
[Pipeline] dir
22:09:56 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] deleteDir
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline]
[Pipeline] // timestamps
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS





share|improve this answer

























  • illegal string character after dollar sign got for this change

    – roy
    Mar 8 at 22:04












  • Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

    – Praveen Premaratne
    Mar 8 at 22:11











  • Do you have a line reff of the offending line?

    – Praveen Premaratne
    Mar 8 at 22:12






  • 1





    nevermind, it worked.

    – roy
    Mar 8 at 22:14











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071024%2fjenkinsfile-not-passing-env-to-sh%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














This is Jenkins thing I think. When you use the sh block with '; it will not have access to things like environment variables. Try using the " instead. That should work



sh """
echo "Building"
echo "$env.BUILD_VERSION"
echo "$env"
"""


Jenkins should recognise the shell block and escape the " within the """ automatically.



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh """
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
"""





post
failure
script
echo "Pipeline Failed"







My test case




pipeline 
agent
node
label 'devops-jenkins-slave'



options
timestamps()


stages

stage('Setup')
steps
dir("$WORKSPACE/")
script
BUILD_VERSION = "1"


sh """
echo "$BUILD_VERSION"
"""






post
always
dir("$WORKSPACE/")
deleteDir()







Result




Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on devops-jenkins-slave in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] timestamps
[Pipeline]
[Pipeline] stage
[Pipeline] (Setup)
[Pipeline] dir
22:09:55 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] script
[Pipeline]
[Pipeline]
[Pipeline] // script
[Pipeline] sh
22:09:56 [Test] Running shell script
22:09:56 + echo 1
22:09:56 1
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] (Declarative: Post Actions)
[Pipeline] dir
22:09:56 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] deleteDir
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline]
[Pipeline] // timestamps
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS





share|improve this answer

























  • illegal string character after dollar sign got for this change

    – roy
    Mar 8 at 22:04












  • Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

    – Praveen Premaratne
    Mar 8 at 22:11











  • Do you have a line reff of the offending line?

    – Praveen Premaratne
    Mar 8 at 22:12






  • 1





    nevermind, it worked.

    – roy
    Mar 8 at 22:14















3














This is Jenkins thing I think. When you use the sh block with '; it will not have access to things like environment variables. Try using the " instead. That should work



sh """
echo "Building"
echo "$env.BUILD_VERSION"
echo "$env"
"""


Jenkins should recognise the shell block and escape the " within the """ automatically.



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh """
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
"""





post
failure
script
echo "Pipeline Failed"







My test case




pipeline 
agent
node
label 'devops-jenkins-slave'



options
timestamps()


stages

stage('Setup')
steps
dir("$WORKSPACE/")
script
BUILD_VERSION = "1"


sh """
echo "$BUILD_VERSION"
"""






post
always
dir("$WORKSPACE/")
deleteDir()







Result




Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on devops-jenkins-slave in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] timestamps
[Pipeline]
[Pipeline] stage
[Pipeline] (Setup)
[Pipeline] dir
22:09:55 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] script
[Pipeline]
[Pipeline]
[Pipeline] // script
[Pipeline] sh
22:09:56 [Test] Running shell script
22:09:56 + echo 1
22:09:56 1
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] (Declarative: Post Actions)
[Pipeline] dir
22:09:56 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] deleteDir
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline]
[Pipeline] // timestamps
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS





share|improve this answer

























  • illegal string character after dollar sign got for this change

    – roy
    Mar 8 at 22:04












  • Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

    – Praveen Premaratne
    Mar 8 at 22:11











  • Do you have a line reff of the offending line?

    – Praveen Premaratne
    Mar 8 at 22:12






  • 1





    nevermind, it worked.

    – roy
    Mar 8 at 22:14













3












3








3







This is Jenkins thing I think. When you use the sh block with '; it will not have access to things like environment variables. Try using the " instead. That should work



sh """
echo "Building"
echo "$env.BUILD_VERSION"
echo "$env"
"""


Jenkins should recognise the shell block and escape the " within the """ automatically.



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh """
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
"""





post
failure
script
echo "Pipeline Failed"







My test case




pipeline 
agent
node
label 'devops-jenkins-slave'



options
timestamps()


stages

stage('Setup')
steps
dir("$WORKSPACE/")
script
BUILD_VERSION = "1"


sh """
echo "$BUILD_VERSION"
"""






post
always
dir("$WORKSPACE/")
deleteDir()







Result




Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on devops-jenkins-slave in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] timestamps
[Pipeline]
[Pipeline] stage
[Pipeline] (Setup)
[Pipeline] dir
22:09:55 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] script
[Pipeline]
[Pipeline]
[Pipeline] // script
[Pipeline] sh
22:09:56 [Test] Running shell script
22:09:56 + echo 1
22:09:56 1
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] (Declarative: Post Actions)
[Pipeline] dir
22:09:56 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] deleteDir
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline]
[Pipeline] // timestamps
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS





share|improve this answer















This is Jenkins thing I think. When you use the sh block with '; it will not have access to things like environment variables. Try using the " instead. That should work



sh """
echo "Building"
echo "$env.BUILD_VERSION"
echo "$env"
"""


Jenkins should recognise the shell block and escape the " within the """ automatically.



pipeline 
agent label 'slave1'

stages
stage ('Build')
steps
script
BUILD_VERSION = sh (
script: 'python get_firmware_version.py',
returnStdout: true
).trim()

echo "$BUILD_VERSION"
withCredentials([file(credentialsId: 'image-sign', variable: 'IMAGE_SIGN')])
dir('firmware/')
echo "$BUILD_VERSION"
sh """
echo "Building"
echo "$BUILD_VERSION"
echo "$env.BUILD_VERSION"
"""





post
failure
script
echo "Pipeline Failed"







My test case




pipeline 
agent
node
label 'devops-jenkins-slave'



options
timestamps()


stages

stage('Setup')
steps
dir("$WORKSPACE/")
script
BUILD_VERSION = "1"


sh """
echo "$BUILD_VERSION"
"""






post
always
dir("$WORKSPACE/")
deleteDir()







Result




Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on devops-jenkins-slave in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] timestamps
[Pipeline]
[Pipeline] stage
[Pipeline] (Setup)
[Pipeline] dir
22:09:55 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] script
[Pipeline]
[Pipeline]
[Pipeline] // script
[Pipeline] sh
22:09:56 [Test] Running shell script
22:09:56 + echo 1
22:09:56 1
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline] stage
[Pipeline] (Declarative: Post Actions)
[Pipeline] dir
22:09:56 Running in /home/jenkins/workspace/Samples/Test
[Pipeline]
[Pipeline] deleteDir
[Pipeline]
[Pipeline] // dir
[Pipeline]
[Pipeline] // stage
[Pipeline]
[Pipeline] // timestamps
[Pipeline]
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 8 at 22:14

























answered Mar 8 at 21:52









Praveen PremaratnePraveen Premaratne

1,4421718




1,4421718












  • illegal string character after dollar sign got for this change

    – roy
    Mar 8 at 22:04












  • Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

    – Praveen Premaratne
    Mar 8 at 22:11











  • Do you have a line reff of the offending line?

    – Praveen Premaratne
    Mar 8 at 22:12






  • 1





    nevermind, it worked.

    – roy
    Mar 8 at 22:14

















  • illegal string character after dollar sign got for this change

    – roy
    Mar 8 at 22:04












  • Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

    – Praveen Premaratne
    Mar 8 at 22:11











  • Do you have a line reff of the offending line?

    – Praveen Premaratne
    Mar 8 at 22:12






  • 1





    nevermind, it worked.

    – roy
    Mar 8 at 22:14
















illegal string character after dollar sign got for this change

– roy
Mar 8 at 22:04






illegal string character after dollar sign got for this change

– roy
Mar 8 at 22:04














Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

– Praveen Premaratne
Mar 8 at 22:11





Sorry, my fault. Try deleting echo "$env.BUILD_VERSION"?

– Praveen Premaratne
Mar 8 at 22:11













Do you have a line reff of the offending line?

– Praveen Premaratne
Mar 8 at 22:12





Do you have a line reff of the offending line?

– Praveen Premaratne
Mar 8 at 22:12




1




1





nevermind, it worked.

– roy
Mar 8 at 22:14





nevermind, it worked.

– roy
Mar 8 at 22:14



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071024%2fjenkinsfile-not-passing-env-to-sh%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page