Like this?

        stage('Build image') { 
            steps {
                sh """TAG=$(git describe --candidate=1 --tags)
                TAG=$(echo $TAG | cut -d\'-\' -f 1)
                
WEB_IMAGE_NAME=$ACR_LOGINSERVER/my-project-1499882073260/test:$TAG
                sudo docker build -t $WEB_IMAGE_NAME -f 
WebApplication/WebApplication1/Dockerfile WebApplication/."""

Does not work. Maybe I did not written properly.

this is my result :

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
failed:
WorkflowScript: 23: illegal string body character after dollar sign;
   solution: either escape a literal dollar sign "\$5" or bracket the value 
expression "${5}" @ line 23, column 17.
                   sh """TAG=$(git describe --candidate=1 --tags)
                   ^
1 error

>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/80c26ddd-690d-4cda-8863-e1f896f027ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to