jenkinsfile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env groovy
  2. pipeline {
  3. agent { label 'linux' }
  4. stages {
  5. stage('Intro') {
  6. steps {
  7. echo "Hello Jenkins!"
  8. }
  9. }
  10. stage('List var') {
  11. steps {
  12. echo "Display Jenkins environment variables"
  13. echo "BRANCH_NAME : ${env.BRANCH_NAME}"
  14. echo "CHANGE_ID : ${env.CHANGE_ID}"
  15. echo "CHANGE_URL : ${env.CHANGE_URL}"
  16. echo "CHANGE_TITLE : ${env.CHANGE_TITLE}"
  17. echo "CHANGE_AUTHOR : ${env.CHANGE_AUTHOR}"
  18. echo "CHANGE_AUTHOR_DISPLAY_NAME : ${env.CHANGE_AUTHOR_DISPLAY_NAME}"
  19. echo "CHANGE_AUTHOR_EMAIL : ${env.CHANGE_AUTHOR_EMAIL}"
  20. echo "CHANGE_TARGET : ${env.CHANGE_TARGET}"
  21. echo "BUILD_NUMBER : ${env.BUILD_NUMBER}"
  22. echo "BUILD_ID : ${env.BUILD_ID}"
  23. echo "BUILD_DISPLAY_NAME : ${env.BUILD_DISPLAY_NAME}"
  24. echo "JOB_NAME : ${env.JOB_NAME}"
  25. echo "JOB_BASE_NAME : ${env.JOB_BASE_NAME}"
  26. echo "BUILD_TAG : ${env.BUILD_TAG}"
  27. echo "EXECUTOR_NUMBER : ${env.EXECUTOR_NUMBER}"
  28. echo "NODE_NAME : ${env.NODE_NAME}"
  29. echo "NODE_LABELS : ${env.NODE_LABELS}"
  30. echo "WORKSPACE : ${env.WORKSPACE}"
  31. echo "JENKINS_HOME : ${env.JENKINS_HOME}"
  32. echo "JENKINS_URL : ${env.JENKINS_URL}"
  33. echo "BUILD_URL : ${env.BUILD_URL}"
  34. echo "JOB_URL : ${env.JOB_URL}"
  35. echo "Done"
  36. }
  37. }
  38. }
  39. }