diff --git a/Jenkinsfile b/Jenkinsfile index db626c1ff..534381063 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,15 +15,19 @@ pipeline { environment { DESTSITE = 'testdeploy' DESTHOST = '18.224.174.2' + LETTER = 'U:' } steps { withCredentials([ usernamePassword(credentialsId: 'deploymentuser_pass', usernameVariable: 'deploymentuser', passwordVariable: 'deploymentpass') ]) { + bat ''' + if not exist %LETTER% subst %LETTER% %WORKSPACE% + ''' bat ''' echo " == Build == " - %msbuild% %workspace%\\publish.proj /t:PrecompileWeb + %msbuild% %LETTER%\\publish.proj /t:PrecompileWeb ''' powershell ''' $ErrorActionPreference='Stop' @@ -31,8 +35,9 @@ pipeline { ''' bat ''' echo " == Deploy == " - %msdeployv2% -verb:sync -source:iisapp="%WORKSPACE%\\Precompiled" -dest:iisapp="%DESTSITE%",computerName="%DESTHOST%",username=%deploymentuser%,password=%deploymentpass% -preSync:runCommand="%WORKSPACE%\\sync.bat",waitInterval=120000 -postSync:runCommand="%WORKSPACE%\\sync.bat",waitInterval=120000 + %msdeployv2% -verb:sync -source:iisapp="%LETTER%\\Precompiled" -dest:iisapp="%DESTSITE%",computerName="%DESTHOST%",username=%deploymentuser%,password=%deploymentpass% -preSync:runCommand="%LETTER%\\sync.bat",waitInterval=120000 -postSync:runCommand="%LETTER%\\sync.bat",waitInterval=120000 ''' + bat 'subst %LETTER% /D' } } } @@ -55,7 +60,7 @@ pipeline { ''' bat ''' echo " == Deploy == " - %msdeployv2% -verb:sync -source:iisapp="%WORKSPACE%\\Precompiled" -dest:iisapp="%DESTSITE%",computerName="%DESTHOST%",username=%deploymentuser%,password=%deploymentpass% -preSync:runCommand="%WORKSPACE%\\sync.bat",waitInterval=120000 -postSync:runCommand="%WORKSPACE%\\sync.bat",waitInterval=120000 + %msdeployv2% -verb:sync -source:iisapp="%LETTER%\\Precompiled" -dest:iisapp="%DESTSITE%",computerName="%DESTHOST%",username=%deploymentuser%,password=%deploymentpass% -preSync:runCommand="%LETTER%\\sync.bat",waitInterval=120000 -postSync:runCommand="%LETTER%\\sync.bat",waitInterval=120000 ''' } }