Skip to content

Commit

Permalink
kie-issues#752: kogito-ci-build start docker in background (#1141)
Browse files Browse the repository at this point in the history
* kie-issues#752: kogito-ci-build start docker in background

* fix build pipeline

This reverts commit 711040e.

---------

Co-authored-by: jstastny-cz <[email protected]>
  • Loading branch information
jstastny-cz and jstastny-cz authored Dec 11, 2023
1 parent f923878 commit ebcf2cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .ci/jenkins/Jenkinsfile.build-kogito-ci-image
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}
Expand Down
11 changes: 2 additions & 9 deletions apache-nodes/start-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
INFO "Starting docker"
bash -c "source wait-for-docker.sh > /dev/null && sudo chown root:docker /var/run/docker.sock" &

0 comments on commit ebcf2cc

Please sign in to comment.