瀏覽代碼

Make step to check environment variables

The most interesting is JOVIAN_WEB_DEPLOY_PATH, because it must be manually set in Jenkins app.
DricomDragon 5 年之前
父節點
當前提交
bb0a82e53f
共有 1 個文件被更改,包括 4 次插入15 次删除
  1. 4 15
      undeployed/ci/jenkinsfile

+ 4 - 15
undeployed/ci/jenkinsfile

@@ -3,22 +3,10 @@
 pipeline {
     agent { label 'prod' }
     stages {
-        stage('Intro') {
+        stage('Check env') {
             steps {
-                echo "Hello Jenkins!"
-            }
-        }
-        stage('List var') {
-            steps {
-                echo "Display Jenkins environment variables"
+                echo "Displaying Jenkins environment variables ..."
                 echo "BRANCH_NAME : ${env.BRANCH_NAME}"
-                echo "CHANGE_ID : ${env.CHANGE_ID}"
-                echo "CHANGE_URL : ${env.CHANGE_URL}"
-                echo "CHANGE_TITLE : ${env.CHANGE_TITLE}"
-                echo "CHANGE_AUTHOR : ${env.CHANGE_AUTHOR}"
-                echo "CHANGE_AUTHOR_DISPLAY_NAME : ${env.CHANGE_AUTHOR_DISPLAY_NAME}"
-                echo "CHANGE_AUTHOR_EMAIL : ${env.CHANGE_AUTHOR_EMAIL}"
-                echo "CHANGE_TARGET : ${env.CHANGE_TARGET}"
                 echo "BUILD_NUMBER : ${env.BUILD_NUMBER}"
                 echo "BUILD_ID : ${env.BUILD_ID}"
                 echo "BUILD_DISPLAY_NAME : ${env.BUILD_DISPLAY_NAME}"
@@ -33,7 +21,8 @@ pipeline {
                 echo "JENKINS_URL : ${env.JENKINS_URL}"
                 echo "BUILD_URL : ${env.BUILD_URL}"
                 echo "JOB_URL : ${env.JOB_URL}"
-                echo "Done"
+                echo "JOVIAN_WEB_DEPLOY_PATH : ${env.JOVIAN_WEB_DEPLOY_PATH}"
+                echo "Done."
             }
         }
     }