fix: do NOT push PRs to registry, other fixes
This commit is contained in:
parent
50a6d670bf
commit
fef496819e
@ -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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user