Explorar el Código

Обновить 'Jenkinsfile'

Vladimir Tomishinets hace 6 años
padre
commit
c67ccc6dfc
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      Jenkinsfile

+ 6 - 4
Jenkinsfile

@@ -57,13 +57,15 @@ pipeline {
              '''
       }
     }
-/*    stage("Build") {
+    stage("Build") {
       steps {
-        echo "Building ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${BUILD_NUMBER}."
-        sh "docker build --no-cache -t ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${BUILD_NUMBER} ."
+        echo "Building ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${SERIAL}."
+        sh """docker build --no-cache -t ${DOCKER_REGISTRY}/iru/${DOCKER_IMAGE}:${SERIAL} .
+              if [ \$? != 0 ]; then echo 'The container was not built'; exit 1; fi
+           """
       }
     }
-    stage("Staging") {
+/*    stage("Staging") {
       steps {
         echo "Run ${DOCKER_IMAGE} in server mode."
         sh '''container_id_server=`docker run -d --rm -e "mode=server" \