From ebcf2cc69d6d6cfc4c8910dd8aa9e8398b6f3579 Mon Sep 17 00:00:00 2001 From: Jan Stastny Date: Mon, 11 Dec 2023 14:23:09 +0100 Subject: [PATCH] kie-issues#752: kogito-ci-build start docker in background (#1141) * kie-issues#752: kogito-ci-build start docker in background * fix build pipeline This reverts commit 711040e7286dd3ad51c7db18ecc9cc24e16aa975. --------- Co-authored-by: jstastny-cz --- .ci/jenkins/Jenkinsfile.build-kogito-ci-image | 4 ++-- apache-nodes/start-docker.sh | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.build-kogito-ci-image b/.ci/jenkins/Jenkinsfile.build-kogito-ci-image index af1b45dca..a3c536d37 100644 --- a/.ci/jenkins/Jenkinsfile.build-kogito-ci-image +++ b/.ci/jenkins/Jenkinsfile.build-kogito-ci-image @@ -36,13 +36,13 @@ pipeline { sh """ docker build -t ${env.IMAGE_NAME_TAG} -f apache-nodes/Dockerfile.kogito-ci-build ./apache-nodes - docker tag ${env.IMAGE_NAME_TAG} ${env.IMAGE_NAME}:${GIT_COMMIT} + docker tag ${env.IMAGE_NAME_TAG} ${env.IMAGE_NAME}:${env.GIT_COMMIT?:githubscm.getCommitHash()} docker tag ${env.IMAGE_NAME_TAG} ${env.IMAGE_NAME}:${BRANCH_NAME}-latest """ sh """ docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME_TAG} - docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME}:${GIT_COMMIT} + docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME}:${env.GIT_COMMIT?:githubscm.getCommitHash()} docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME}:${BRANCH_NAME}-latest """ } diff --git a/apache-nodes/start-docker.sh b/apache-nodes/start-docker.sh index 9b1422d9a..930eb5537 100755 --- a/apache-nodes/start-docker.sh +++ b/apache-nodes/start-docker.sh @@ -4,12 +4,5 @@ source /opt/bash-utils/logger.sh INFO "Starting supervisor" sudo bash -c "/usr/bin/supervisord >> /dev/null 2>&1" & -INFO "Waiting for docker to be running" -source wait-for-docker.sh -if [ $? -ne 0 ]; then - ERROR "dockerd is not running after max time" - exit 1 -else - sudo chown root:docker /var/run/docker.sock - INFO "dockerd is running" -fi \ No newline at end of file +INFO "Starting docker" +bash -c "source wait-for-docker.sh > /dev/null && sudo chown root:docker /var/run/docker.sock" &