diff options
-rw-r--r-- | changelogs/unreleased/11448-fix-cs-with-k8s-runners.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml | 2 |
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..." |