updated scan stage
willemjan/glucose-dashboard/pipeline/head There was a failure building this commit

This commit is contained in:
2026-08-28 14:24:48 +02:00
parent 1f2b0d917a
commit ae0c736ea7
Vendored
+17 -20
View File
@@ -28,12 +28,6 @@ pipeline {
}
stage('Test') {
agent {
docker {
image 'python:3.12-slim'
reuseNode true
}
}
steps {
sh '''
python -m venv .venv
@@ -64,14 +58,17 @@ pipeline {
}
stage('Scan') {
agent {
docker {
image 'aquasec:trivy'
reuseNode true
}
}
steps {
sh 'trivy image --exit-code 0 --severity HIGH,CRITICAL $IMAGE:$TAG'
sh '''
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v trivy-cache:/root/.cache/trivy \
aquasec/trivy:latest image \
--severity HIGH,CRITICAL \
--ignore-unfixed \
--exit-code 0 \
$IMAGE:$TAG
'''
}
}
@@ -95,13 +92,13 @@ pipeline {
'''
}
}
post {
always { sh 'oc logout || true' }
success {
sh 'echo "Deployed: $(oc get route glucose-dashboard -o jsonpath={.spec.host})" || true'
}
}
}
}
post {
always { sh 'oc logout || true' }
success {
sh 'echo "Deployed: $(oc get route glucose-dashboard -o jsonpath={.spec.host})" || true'
}
}
}