Skip to content

Commit

Permalink
ci: move security scan back to build-container pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Dec 13, 2024
1 parent 3f3bd3a commit 8a35d58
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
35 changes: 34 additions & 1 deletion .woodpecker/build-container.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
---
when:
- event: [tag]
- event: [pull_request, tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}

steps:
- name: security-build
image: quay.io/thegeeklab/wp-docker-buildx:6
settings:
containerfile: Containerfile.multiarch
output: type=oci,dest=oci/${CI_REPO_NAME},tar=false
repo: ${CI_REPO}
registry_config:
from_secret: DOCKER_REGISTRY_CONFIG_PULL

- name: security-scan
image: docker.io/aquasec/trivy
depends_on: [security-build]
commands:
- trivy -v
- trivy image --input oci/${CI_REPO_NAME}
environment:
TRIVY_EXIT_CODE: "1"
TRIVY_IGNORE_UNFIXED: "true"
TRIVY_NO_PROGRESS: "true"
TRIVY_SEVERITY: HIGH,CRITICAL
TRIVY_TIMEOUT: 1m
TRIVY_DB_REPOSITORY: docker.io/aquasec/trivy-db:2

- name: publish-dockerhub
image: quay.io/thegeeklab/wp-docker-buildx:6
depends_on: [security-scan]
Expand All @@ -21,6 +44,11 @@ steps:
repo: ${CI_REPO}
username:
from_secret: docker_username
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}

- name: publish-quay
image: quay.io/thegeeklab/wp-docker-buildx:6
Expand All @@ -38,6 +66,11 @@ steps:
repo: quay.io/${CI_REPO}
username:
from_secret: quay_username
when:
- event: [tag]
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}

depends_on:
- test
33 changes: 0 additions & 33 deletions .woodpecker/securityscan.yml

This file was deleted.

0 comments on commit 8a35d58

Please sign in to comment.