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.