From 09c15738b31878bb1e0ab010a8741103ae38c8a1 Mon Sep 17 00:00:00 2001 From: Habib MAALEM Date: Wed, 17 Mar 2021 09:15:55 +0000 Subject: [PATCH] Set .gitlab-ci.yml to enable or configure SAST --- .gitlab-ci.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dcdd56d..6d7ed97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,39 +1,41 @@ +# You can override the included template(s) by including variable overrides +# See https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings +# Note that environment variables can be set in several places +# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables image: maven:latest - include: - template: Dependency-Scanning.gitlab-ci.yml - +- template: Dependency-Scanning.gitlab-ci.yml +- template: Security/SAST.gitlab-ci.yml variables: MAVEN_CLI_OPTS: "-s .ci/maven/settings.xml --batch-mode" MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" - cache: paths: - - .m2/repository/ - - target/ - + - ".m2/repository/" + - target/ build: stage: build script: - - mvn $MAVEN_CLI_OPTS compile - + - mvn $MAVEN_CLI_OPTS compile test: stage: test script: - - mvn $MAVEN_CLI_OPTS test - + - mvn $MAVEN_CLI_OPTS test deploy: stage: deploy script: - - mvn $MAVEN_CLI_OPTS deploy + - mvn $MAVEN_CLI_OPTS deploy only: - - master - + - master pages: image: python:alpine script: - - pip install mkdocs - - mkdocs build + - pip install mkdocs + - mkdocs build artifacts: paths: - - public \ No newline at end of file + - public +stages: +- test +sast: + stage: test -- GitLab