Merge branch 'set-sast-config-1' into 'main'
Configure SAST in `.gitlab-ci.yml`, creating this file if it does not already exist See merge request fager/deployment-helper!3
This commit is contained in:
commit
9cb60ea79f
1 changed files with 14 additions and 19 deletions
|
|
@ -1,23 +1,21 @@
|
|||
# You can override the included template(s) by including variable overrides
|
||||
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
||||
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
|
||||
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
|
||||
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
|
||||
# Note that environment variables can be set in several places
|
||||
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
||||
#image: docker:19.03
|
||||
image: docker:git
|
||||
services:
|
||||
#- docker:19.03-dind
|
||||
- docker:dind
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2376
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
|
||||
stages:
|
||||
- commit
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
- commit
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
build:
|
||||
stage: build
|
||||
before_script:
|
||||
|
|
@ -25,30 +23,27 @@ build:
|
|||
script:
|
||||
- docker build --tag $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID .
|
||||
- docker push $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID
|
||||
|
||||
test:
|
||||
stage: test
|
||||
image: $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID
|
||||
image: "$CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID"
|
||||
script:
|
||||
- python --version
|
||||
- nikola --version
|
||||
- pip --version
|
||||
- pip freeze
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
before_script:
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
script:
|
||||
- docker pull $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID
|
||||
- docker tag $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID $CI_REGISTRY_IMAGE:latest
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
|
||||
|
||||
- docker pull $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID
|
||||
- docker tag $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID $CI_REGISTRY_IMAGE:latest
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
include:
|
||||
- template: Security/SAST.gitlab-ci.yml
|
||||
- template: Security/Container-Scanning.gitlab-ci.yml
|
||||
|
||||
container_scanning:
|
||||
variables:
|
||||
CS_IMAGE: $CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID
|
||||
CS_IMAGE: "$CI_REGISTRY_IMAGE:job-$CI_PIPELINE_ID"
|
||||
sast:
|
||||
stage: test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue