瀏覽代碼

Merge branch 'wheng' of wuheng/eas-system into master

sifu-gogs 1 年之前
父節點
當前提交
7ac3c9f282
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Jenkinsfile

+ 2 - 0
Jenkinsfile

@@ -14,6 +14,8 @@ pipeline {
             steps {
                 echo 'Building..'
                 sh 'docker-compose down'
+                sh 'EASID=$(docker ps | grep easapimaster | awk \'{print $1}\')'
+                sh '[ -n "$EASID" ] && docker kill $EASID && docker rm $EASID || echo -n "Docker Container is Down!"'
                 sh '~/tools/apache-maven-3.6.3/bin/mvn sonar:sonar'
                 sh '~/tools/apache-maven-3.6.3/bin/mvn  clean install -Dmaven.test.skip=true'
                 sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'