Browse Source

debug. Enable ${APPNET}

Владимир Томишинец 5 years ago
parent
commit
c3629aad9b
2 changed files with 10 additions and 8 deletions
  1. 1 1
      Jenkinsfile
  2. 9 7
      docker-entrypoint.sh

+ 1 - 1
Jenkinsfile

@@ -40,7 +40,7 @@ pipeline {
         echo "Building ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER}."
         sh "docker build --build-arg repo=${repo} --no-cache -t ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} ."
         script {
-           NEWTAG = sh script: "docker run --rm --entrypoint=\"\" ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} rpm -q --qf %{VERSION}-%{RELEASE} ${PACKAGE_NAME} 2> /dev/null", returnStdout: true
+           NEWTAG = sh script: "docker run --rm ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${repo}-${BUILD_NUMBER} rpm -q --qf %{VERSION}-%{RELEASE} ${PACKAGE_NAME} 2> /dev/null", returnStdout: true
            NEWTAG = repo + "-" + NEWTAG + "_" + BUILD_NUMBER
            echo "NEWTAG is $NEWTAG"
         }

+ 9 - 7
docker-entrypoint.sh

@@ -1,12 +1,14 @@
 #!/usr/bin/env bash
 
-echo "Initial nslookup ${ADMIN_HOST}"
-nslookup ${ADMIN_HOST}
-while [ $? -ne 0 ]; do
-    echo "Waiting for ${ADMIN_HOST} to become available"
-    sleep 1
-    nslookup ${ADMIN_HOST}
-done
+if [ ! -z "${APPNET}" ]; then
+    echo "Initial nslookup ${ADMIN_HOST}.${APPNET}"
+    nslookup ${ADMIN_HOST}.${APPNET}
+    while [ $? -ne 0 ]; do
+        echo "Waiting for ${ADMIN_HOST}.${APPNET} to become available"
+        sleep 1
+        nslookup ${ADMIN_HOST}.${APPNET}
+    done
+fi
 
 echo "#Dummy" >> /etc/rc.d/init.d/functions
 source /etc/init.d/web-registry-portal status