소스 검색

更新 'Jenkinsfile'

sifu-gogs 2 년 전
부모
커밋
dbf2b2239a
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      Jenkinsfile

+ 5 - 3
Jenkinsfile

@@ -1,5 +1,8 @@
 pipeline {
     agent any
+    environment {
+        BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
+    }
     stages {
         stage('Build') {
             agent {
@@ -19,11 +22,10 @@ pipeline {
             }
         }
         stage('Deploy') {
-            environment {
-                BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
-            }
             steps {
                 echo 'Deploying....'
+                sh 'sh pwd'
+                sh 'sh ls -la'
                 sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
                 sh 'docker-compose up -d'
             }