summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2019-06-19 06:31:23 +0000
committerJames Lopez <james@gitlab.com>2019-06-19 06:31:23 +0000
commit69e1bd389f3cb04d451900f981be646462ffd039 (patch)
tree221236402f031930051f9abc09833e984f6625a0
parent1af9a690d55351cc62f7f071fb6af84fb6721ab3 (diff)
parent2a6dab97d931bff88a9c276a480f158865300429 (diff)
downloadgitlab-ce-69e1bd389f3cb04d451900f981be646462ffd039.tar.gz
Merge branch '11448-fix-cs-with-k8s-runners' into 'master'
Fix Container Scanning job with K8S runners Closes gitlab-ee#11448 See merge request gitlab-org/gitlab-ce!29706
-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..."