Skip to content

Commit

Permalink
trivy exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
gracewehner committed Feb 3, 2025
1 parent dffe0c7 commit dc0680a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ variables:
IS_MAIN_BRANCH: $[eq(variables['Build.SourceBranchName'], 'main')]
BUILD_WINDOWS: true
Codeql.Enabled: true
GOLANG_VERSION: '1.22.7'
GOLANG_VERSION: '1.22'
FLUENT_BIT_VERSION: '3.2.2'

stages:
Expand Down Expand Up @@ -769,7 +769,7 @@ stages:
export TRIVY_JAVA_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db"
for image in $(LINUX_FULL_IMAGE_NAME) $(KUBE_STATE_METRICS_IMAGE) $(NODE_EXPORTER_IMAGE); do
for i in {1..5}; do
trivy image --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $image > trivy_output.log 2>&1
trivy image --exit-code 1 --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $image > trivy_output.log 2>&1
TRIVY_EXIT_CODE=$?
if [ $TRIVY_EXIT_CODE -eq 0 ]; then
cat trivy_output.log
Expand Down Expand Up @@ -957,7 +957,7 @@ stages:
export TRIVY_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db"
export TRIVY_JAVA_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db"
for i in {1..5}; do
trivy image --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $(LINUX_CCP_FULL_IMAGE_NAME) > trivy_output.log 2>&1
trivy image --exit-code 1 --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $(LINUX_CCP_FULL_IMAGE_NAME) > trivy_output.log 2>&1
TRIVY_EXIT_CODE=$?
if [ $TRIVY_EXIT_CODE -eq 0 ]; then
cat trivy_output.log
Expand Down Expand Up @@ -1086,7 +1086,7 @@ stages:
export TRIVY_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db"
export TRIVY_JAVA_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db"
for i in {1..5}; do
trivy image --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $(TARGET_ALLOCATOR_FULL_IMAGE_NAME) > trivy_output.log 2>&1
trivy image --exit-code 1 --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $(TARGET_ALLOCATOR_FULL_IMAGE_NAME) > trivy_output.log 2>&1
TRIVY_EXIT_CODE=$?
if [ $TRIVY_EXIT_CODE -eq 0 ]; then
cat trivy_output.log
Expand Down Expand Up @@ -1203,7 +1203,7 @@ stages:
export TRIVY_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db"
export TRIVY_JAVA_DB_REPOSITORY="ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db"
for i in {1..5}; do
trivy image --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $(LINUX_CONFIG_READER_FULL_IMAGE_NAME) > trivy_output.log 2>&1
trivy image --exit-code 1 --ignore-unfixed --no-progress --severity HIGH,CRITICAL,MEDIUM $(LINUX_CONFIG_READER_FULL_IMAGE_NAME) > trivy_output.log 2>&1
TRIVY_EXIT_CODE=$?
if [ $TRIVY_EXIT_CODE -eq 0 ]; then
cat trivy_output.log
Expand Down

0 comments on commit dc0680a

Please sign in to comment.