Pipeline declarative - multiline bat does not resolve the env.variables

6 views
Skip to first unread message

zakyn

unread,
May 2, 2019, 8:58:59 AM5/2/19
to Jenkins Users
Hello,

I have this code and the env.variables are not resolved :(  I do not see the reason.

Thank you for your help.

Vladimir

Code:

                stage('My stage'){
                    steps{
                        bat '''
                            cd folder\\folder1
                            ..\\..\\..\\folder1\\folder1\\folder1\\python.exe ..\\..\\folder1\\folder1\\action.py ..\\..\\ ..\\..\\_build ${env.JOB_NAME}#${env.BUILD_NUMBER} param param
                            '''
                    }
                }


Slide

unread,
May 2, 2019, 9:01:08 AM5/2/19
to Jenkins User Mailing List
You need to use triple double quotes for string interpolation to work:

bat """

"""

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fe42b096-fa21-4882-8d20-f8a8c14a77c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages