Configure Container Scanning in .gitlab-ci.yml, creating this file if it does not already exist
This commit is contained in:
@@ -1,14 +1,26 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
# container_scanning:
|
||||||
|
# variables:
|
||||||
|
# DOCKER_IMAGE: ...
|
||||||
|
# DOCKER_USER: ...
|
||||||
|
# DOCKER_PASSWORD: ...
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- upload
|
- upload
|
||||||
- release
|
- release
|
||||||
|
|
||||||
sast:
|
sast:
|
||||||
stage: test
|
stage: test
|
||||||
include:
|
include:
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
|
- template: Security/Container-Scanning.gitlab-ci.yml
|
||||||
build-docker:
|
build-docker:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
@@ -24,7 +36,6 @@ build-docker:
|
|||||||
- docker build -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest .
|
- docker build -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest .
|
||||||
- docker push $IMAGE_TAG
|
- docker push $IMAGE_TAG
|
||||||
- docker push $CI_REGISTRY_IMAGE:latest
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
|
||||||
build-binary:
|
build-binary:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
@@ -45,7 +56,6 @@ build-binary:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- bin/
|
- bin/
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
stage: upload
|
stage: upload
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
@@ -64,7 +74,6 @@ upload:
|
|||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/insultgen/${CI_COMMIT_TAG}/insultgen-${CI_COMMIT_TAG}-win-amd64.exe"'
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/insultgen/${CI_COMMIT_TAG}/insultgen-${CI_COMMIT_TAG}-win-amd64.exe"'
|
||||||
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/insultgen-${CI_COMMIT_TAG}-win-x86.exe
|
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/insultgen-${CI_COMMIT_TAG}-win-x86.exe
|
||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/insultgen/${CI_COMMIT_TAG}/insultgen-${CI_COMMIT_TAG}-win-x86.exe"'
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/insultgen/${CI_COMMIT_TAG}/insultgen-${CI_COMMIT_TAG}-win-x86.exe"'
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:v0.4.0
|
image: registry.gitlab.com/gitlab-org/release-cli:v0.4.0
|
||||||
|
|||||||
Reference in New Issue
Block a user