chore: groovy formating

This commit is contained in:
Stefan Reimer 2022-02-11 18:13:04 +01:00
parent 2aa04e7ac5
commit cec5dcdece

View File

@ -2,10 +2,14 @@
def call(Map config) {
pipeline {
agent { node { label 'podman-aws-trivy' } }
agent {
node {
label 'podman-aws-trivy'
}
}
stages {
stage('Prepare'){
stage('Prepare') {
// get tags
steps {
sh 'git fetch -q --tags ${GIT_URL} +refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}'
@ -13,20 +17,20 @@ def call(Map config) {
}
// Build using rootless podman
stage('Build'){
stage('Build') {
steps {
sh 'make build'
}
}
stage('Test'){
stage('Test') {
steps {
sh 'make test'
}
}
// Scan via trivy
stage('Scan'){
stage('Scan') {
environment {
TRIVY_FORMAT = "template"
TRIVY_OUTPUT = "reports/trivy.html"
@ -34,7 +38,7 @@ def call(Map config) {
steps {
sh 'mkdir -p reports'
sh 'make scan'
publishHTML target : [
publishHTML target: [
allowMissing: true,
alwaysLinkToLastBuild: true,
keepAll: true,
@ -50,12 +54,11 @@ def call(Map config) {
}
// Push to ECR
stage('Push'){
stage('Push') {
steps {
sh 'make push'
}
}
}
}
}
}