Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56420

Declarative Pipeline: dir() inside a step problem

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am trying to refactor a step in my pipeline.  Currently I have this stage:

       

      stage('Deploy') {
       steps {
       echo 'Deploying....'
       //dir('$SQLPROJDIR\\bin\\Output') {
       bat "$SQLPACKAGE /action:publish " + 
       "/sourcefile:$SQLPROJDIR\\bin\\Output\\Vision.dacpac " + 
       "/profile:$SQLPROJDIR\\bin\\Output\\Vision.dev.publish.xml " +
       "/targetdatabasename:Vision_develop " 
       //}
      }}

      which works fine and runs about 5 min.  I want to factor out the directory refs by wrapping the bat call inside a dir(){}, but when I uncomment the call to dir (and the matching end brace, the deployment never finishes and I do not see any of the many messages that the deployment issues to the console.

        Attachments

          Activity

          Hide
          gbritton Gerald Britton added a comment -

          My bad.  Forgot to use g-string in dir

          Show
          gbritton Gerald Britton added a comment - My bad.  Forgot to use g-string in dir

            People

            • Assignee:
              Unassigned
              Reporter:
              gbritton Gerald Britton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: