Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues#752: kogito-ci-build start docker in background #1141

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" &