Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. pipeline {
  2. agent any
  3. environment {
  4. // comment added
  5. APPLICATION = 'app'
  6. ENVIRONMENT = 'dev'
  7. MAINTAINER_NAME = 'jenkins'
  8. MAINTAINER_EMAIL = 'jenkins@email.com'
  9. }
  10. stages {
  11. stage('clone repository') {
  12. steps {
  13. // cloning repo
  14. checkout scm
  15. }
  16. }
  17. stage('Build Image') {
  18. steps {
  19. script {
  20. sshagent(credentials : ['jenkins-pem']) {
  21. sh "echo pwd"
  22. sh 'ssh -t -t ubuntu@xx.xxx.xx.xx -o StrictHostKeyChecking=no'
  23. sh "echo pwd"
  24. sh 'sudo -i -u root'
  25. sh 'cd /opt/docker/web'
  26. sh 'echo pwd'
  27. }
  28. }
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement