Commit ff84662f authored by Kamil Trzciński's avatar Kamil Trzciński Committed by GitLab Release Tools Bot

Merge branch '10471-remove-before-script-for-dast-template-ce' into 'master'

Remove before_script from DAST vendored template

See merge request gitlab-org/gitlab-ce!26281

(cherry picked from commit 7cfc090d)

0ed42904 Move dast_run under script section, EE counterpart
parent e4130eea
...@@ -21,20 +21,19 @@ dast: ...@@ -21,20 +21,19 @@ dast:
allow_failure: true allow_failure: true
services: services:
- docker:stable-dind - docker:stable-dind
before_script: script:
- export DAST_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')} - export DAST_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')}
- | - |
function dast_run() { function dast_run() {
docker run \ docker run \
--env DAST_TARGET_AVAILABILITY_TIMEOUT \ --env DAST_TARGET_AVAILABILITY_TIMEOUT \
--volume "$PWD:/output" \ --volume "$PWD:/output" \
--volume /var/run/docker.sock:/var/run/docker.sock \ --volume /var/run/docker.sock:/var/run/docker.sock \
-w /output \ -w /output \
"registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION" \ "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION" \
/analyze -t $DAST_WEBSITE \ /analyze -t $DAST_WEBSITE \
"$@" "$@"
} }
script:
- | - |
if [ -n "$DAST_AUTH_URL" ] if [ -n "$DAST_AUTH_URL" ]
then then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment