chore: groovy formating
This commit is contained in:
parent
2aa04e7ac5
commit
cec5dcdece
@ -2,10 +2,14 @@
|
|||||||
|
|
||||||
def call(Map config) {
|
def call(Map config) {
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { node { label 'podman-aws-trivy' } }
|
agent {
|
||||||
|
node {
|
||||||
|
label 'podman-aws-trivy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
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} +refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}'
|
||||||
@ -13,20 +17,20 @@ def call(Map config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build using rootless podman
|
// Build using rootless podman
|
||||||
stage('Build'){
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh 'make build'
|
sh 'make build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Test'){
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
sh 'make test'
|
sh 'make test'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scan via trivy
|
// Scan via trivy
|
||||||
stage('Scan'){
|
stage('Scan') {
|
||||||
environment {
|
environment {
|
||||||
TRIVY_FORMAT = "template"
|
TRIVY_FORMAT = "template"
|
||||||
TRIVY_OUTPUT = "reports/trivy.html"
|
TRIVY_OUTPUT = "reports/trivy.html"
|
||||||
@ -34,7 +38,7 @@ def call(Map config) {
|
|||||||
steps {
|
steps {
|
||||||
sh 'mkdir -p reports'
|
sh 'mkdir -p reports'
|
||||||
sh 'make scan'
|
sh 'make scan'
|
||||||
publishHTML target : [
|
publishHTML target: [
|
||||||
allowMissing: true,
|
allowMissing: true,
|
||||||
alwaysLinkToLastBuild: true,
|
alwaysLinkToLastBuild: true,
|
||||||
keepAll: true,
|
keepAll: true,
|
||||||
@ -50,12 +54,11 @@ def call(Map config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Push to ECR
|
// Push to ECR
|
||||||
stage('Push'){
|
stage('Push') {
|
||||||
steps {
|
steps {
|
||||||
sh 'make push'
|
sh 'make push'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user