jenkinsfile 785 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env groovy
  2. pipeline {
  3. agent { label 'prod' }
  4. stages {
  5. stage('Check env') {
  6. steps {
  7. echo "Displaying Jenkins environment variables ..."
  8. echo "BRANCH_NAME : ${env.BRANCH_NAME}"
  9. echo "JOVIAN_WEB_DEPLOY_PATH : ${env.JOVIAN_WEB_DEPLOY_PATH}"
  10. echo "JOVIAN_WEB_PREPROD_PATH : ${env.JOVIAN_WEB_PREPROD_PATH}"
  11. echo "Done."
  12. }
  13. }
  14. stage('Deploy') {
  15. when { branch 'master' }
  16. steps {
  17. sh "undeployed/scripts/deploy/up-date.sh"
  18. sh "undeployed/scripts/deploy/up-version.sh"
  19. sh "rsync --delete --recursive --verbose web/ ${env.JOVIAN_WEB_DEPLOY_PATH}"
  20. }
  21. }
  22. }
  23. }