summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Lafoucrière <plafoucriere@gitlab.com>2019-06-19 06:31:22 +0000
committerJames Lopez <james@gitlab.com>2019-06-19 06:31:22 +0000
commit2a6dab97d931bff88a9c276a480f158865300429 (patch)
tree221236402f031930051f9abc09833e984f6625a0
parent1af9a690d55351cc62f7f071fb6af84fb6721ab3 (diff)
downloadgitlab-ce-2a6dab97d931bff88a9c276a480f158865300429.tar.gz
Fix Container Scanning job with K8S runners
-rw-r--r--changelogs/unreleased/11448-fix-cs-with-k8s-runners.yml5
-rw-r--r--lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/11448-fix-cs-with-k8s-runners.yml b/changelogs/unreleased/11448-fix-cs-with-k8s-runners.yml
new file mode 100644
index 00000000000..191e64df4f1
--- /dev/null
+++ b/changelogs/unreleased/11448-fix-cs-with-k8s-runners.yml
@@ -0,0 +1,5 @@
+---
+title: Fix Container Scanning job timeout when using the kubernetes executor
+merge_request: 29706
+author:
+type: fixed
diff --git a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
index 5372ec6cceb..d1a34c515fa 100644
--- a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
@@ -30,7 +30,7 @@ container_scanning:
services:
- docker:stable-dind
script:
- - if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then { export DOCKER_SERVICE="localhost" ; export DOCKER_HOST="tcp://${DOCKER_SERVICE}:2375" ; } fi
+ - if [[ -n "$KUBERNETES_PORT" ]]; then { export DOCKER_SERVICE="localhost" ; export DOCKER_HOST="tcp://${DOCKER_SERVICE}:2375" ; } fi
- |
if [[ -n "$CI_REGISTRY_USER" ]]; then
echo "Logging to GitLab Container Registry with CI credentials..."