summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorOlivier Gonzalez <ogonzalez@gitlab.com>2018-04-18 13:03:40 -0400
committerOlivier Gonzalez <ogonzalez@gitlab.com>2018-04-18 13:03:40 -0400
commit30aaf6c6abc61f05a8b9646549f75fee267cef3e (patch)
tree11597d73d937c942475ac7ee8ac584fb850a8eba /vendor
parentd8dd75ca775f66fd756e43ddd73ac75d39fc3e64 (diff)
downloadgitlab-ce-30aaf6c6abc61f05a8b9646549f75fee267cef3e.tar.gz
Avoid infinite loop in container scanning job. Refs gitlab-org/gitlab-ee#5706
Diffstat (limited to 'vendor')
-rw-r--r--vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
index 4f4ed80d101..3b77055b644 100644
--- a/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
+++ b/vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
@@ -315,7 +315,9 @@ production:
mv clair-scanner_linux_amd64 clair-scanner
chmod +x clair-scanner
touch clair-whitelist.yml
- while( ! wget -q -O /dev/null http://docker:6060/v1/namespaces ) ; do sleep 1 ; done
+ retries=0
+ echo "Waiting for clair daemon to start"
+ while( ! wget -T 10 -q -O /dev/null http://docker:6060/v1/namespaces ) ; do sleep 1 ; echo -n "." ; if [ $retries -eq 10 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; retries=$(($retries+1)) ; done
./clair-scanner -c http://docker:6060 --ip $(hostname -i) -r gl-sast-container-report.json -l clair.log -w clair-whitelist.yml ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} || true
}