fix: do NOT push PRs to registry, other fixes

This commit is contained in:
Stefan Reimer 2022-12-21 12:27:30 +00:00
parent 50a6d670bf
commit fef496819e
1 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ def call(Map config=[:]) {
stage('Prepare') { stage('Prepare') {
// get tags // get tags
steps { steps {
sh 'git fetch -q --tags ${GIT_URL} +refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}' sh 'git fetch -q --tags ${GIT_URL}'
} }
} }
@ -36,8 +36,7 @@ def call(Map config=[:]) {
TRIVY_OUTPUT = "reports/trivy.html" TRIVY_OUTPUT = "reports/trivy.html"
} }
steps { steps {
sh 'mkdir -p reports' sh 'mkdir -p reports && make scan'
sh 'make scan'
publishHTML target: [ publishHTML target: [
allowMissing: true, allowMissing: true,
alwaysLinkToLastBuild: true, alwaysLinkToLastBuild: true,
@ -59,10 +58,11 @@ def call(Map config=[:]) {
} }
} }
// Push to ECR // Push to container registry
stage('Push') { stage('Push') {
steps { steps {
sh 'make ecr-login push' when { not { changeRequest() } }
sh 'make push'
} }
} }