Advertisement
Guest User

Untitled

a guest
May 9th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. pipeline {
  2. agent any
  3. stages {
  4. stage('Pre-Build') {
  5. steps {
  6. bat 'powershell -Command "& {Get-ChildItem Env:}"'
  7. ws(dir: 'C:/J/TestSimulator') {
  8. deleteDir()
  9. checkout scm
  10. }
  11. }
  12. }
  13. stage('Build') {
  14. steps {
  15. ws(dir: 'C:/J/TestSimulator') {
  16. bat 'powershell -Command "& {ls}"'
  17. bat 'powershell -Command "& {nuget.exe restore}"'
  18. bat "\"${tool 'MSBuild'}\" TestSimulator.sln /p:Configuration=Release /p:Platform=\"Any CPU\" /p:ProductVersion=1.0.0.${env.BUILD_NUMBER}"
  19. }
  20. }
  21. }
  22. stage('Development Deploy') {
  23. steps {
  24. ws(dir: 'C:/J/TestSimulator') {
  25. bat 'powershell -Command "& {NET STOP TestSimulator}"'
  26. bat 'powershell -Command "& {Remove-Item C:/TestSimulator -Recurse -Force}"'
  27. bat 'powershell -Command "& {New-Item C:/TestSimulator -type directory}"'
  28. bat 'powershell -Command "& {Copy-Item Service/bin/Release/*.exe C:/TestSimulator}"'
  29. bat 'powershell -Command "& {Copy-Item Service/bin/Release/*.dll C:/TestSimulator}"'
  30. bat 'powershell -Command "& {Copy-Item Service/bin/Release/*.config C:/TestSimulator}"'
  31. bat 'powershell -Command "& {Copy-Item Service/bin/Release/WebContent C:/TestSimulator -Force -Recurse}"'
  32. withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'TestSimulatorDevDeployUser', usernameVariable: 'DEVUSERNAME', passwordVariable: 'DEVPASSWORD']]) {
  33. bat 'powershell -Command "& {C:/TestSimulator/TestSimulator.Service.exe install -username:.\\$ENV:DEVUSERNAME -password:$ENV:DEVPASSWORD}"'
  34. }
  35. bat 'powershell -Command "& {NET START TestSimulator}"'
  36. }
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement