kie-issues#747: tweak CI image docker startup #1140
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Wait for docker start when using kogito-ci-build container incubator-kie-issues#747
Adding an extra script to kogito-ci-build image to allow waiting for dockerd to be started.
Reason is that Jenkins does not wait for entrypoint.sh to finish before it starts executing steps towards it. Thus sometimes the docker is not yet started and docker socket available.
Adding also pipeline util method util.waitForDocker() which first sleeps for short period of time before invoking the wait script against the container - in some cases the waiting script's invocation seemed to be too early to be successful - jenkins would just hang.
Thanks to library definition changes in the Jenkinsfile.build-kogito-ci-image the jenkins library change was properly tested.
Also included change to change default shell to bash, instead of dash.