You've already forked RekomenciBackend
fix: fixed default template in CI
This commit is contained in:
+13
-2
@@ -19,7 +19,7 @@ cache:
|
|||||||
- .cache/trivy
|
- .cache/trivy
|
||||||
policy: pull-push
|
policy: pull-push
|
||||||
|
|
||||||
default:
|
.docker-job: &docker-job
|
||||||
image: docker:28.0
|
image: docker:28.0
|
||||||
services:
|
services:
|
||||||
- docker:28.0-dind
|
- docker:28.0-dind
|
||||||
@@ -37,6 +37,8 @@ default:
|
|||||||
paths:
|
paths:
|
||||||
- $TRIVY_CACHE_DIR
|
- $TRIVY_CACHE_DIR
|
||||||
policy: pull-push
|
policy: pull-push
|
||||||
|
before_script:
|
||||||
|
- mkdir -p $TRIVY_CACHE_DIR
|
||||||
script:
|
script:
|
||||||
- trivy filesystem --skip-files $TRIVY_CACHE_DIR --format cyclonedx --output fs-sbom.json .
|
- trivy filesystem --skip-files $TRIVY_CACHE_DIR --format cyclonedx --output fs-sbom.json .
|
||||||
- trivy filesystem --skip-files $TRIVY_CACHE_DIR --format sarif --output gl-sast-fs-report.json .
|
- trivy filesystem --skip-files $TRIVY_CACHE_DIR --format sarif --output gl-sast-fs-report.json .
|
||||||
@@ -63,10 +65,14 @@ default:
|
|||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
variables:
|
variables:
|
||||||
TRIVY_CACHE_DIR: .cache/trivy
|
TRIVY_CACHE_DIR: .cache/trivy
|
||||||
|
TRIVY_USERNAME: $CI_REGISTRY_USER
|
||||||
|
TRIVY_PASSWORD: $CI_REGISTRY_PASSWORD
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- $TRIVY_CACHE_DIR
|
- $TRIVY_CACHE_DIR
|
||||||
policy: pull-push
|
policy: pull-push
|
||||||
|
before_script:
|
||||||
|
- mkdir -p $TRIVY_CACHE_DIR
|
||||||
script:
|
script:
|
||||||
- trivy image --format cyclonedx --output image-sbom-${IMAGE_TYPE}.json $IMAGE_NAME:$CI_COMMIT_SHA
|
- trivy image --format cyclonedx --output image-sbom-${IMAGE_TYPE}.json $IMAGE_NAME:$CI_COMMIT_SHA
|
||||||
- trivy image --format sarif --output gl-sast-image-${IMAGE_TYPE}-report.json $IMAGE_NAME:$CI_COMMIT_SHA
|
- trivy image --format sarif --output gl-sast-image-${IMAGE_TYPE}-report.json $IMAGE_NAME:$CI_COMMIT_SHA
|
||||||
@@ -101,6 +107,7 @@ default:
|
|||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
.build-template: &build-config
|
.build-template: &build-config
|
||||||
|
<<: *docker-job
|
||||||
stage: build
|
stage: build
|
||||||
variables:
|
variables:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
@@ -125,7 +132,8 @@ default:
|
|||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
.run-test-template: &test-config
|
.test-template: &test-config
|
||||||
|
<<: *docker-job
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- apk add --no-cache docker-compose
|
- apk add --no-cache docker-compose
|
||||||
@@ -151,6 +159,9 @@ default:
|
|||||||
- ./.cov
|
- ./.cov
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
when: always
|
when: always
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
|
|
||||||
sast-filesystem:
|
sast-filesystem:
|
||||||
<<: *trivy-fs-scan
|
<<: *trivy-fs-scan
|
||||||
|
|||||||
Reference in New Issue
Block a user