From 991e9b2ffc76da13973684428de938c38dfc3156 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Sun, 16 Jan 2022 11:55:02 +0100 Subject: [PATCH] fix: add workaround for Jenkins --- Jenkinsfile | 13 +++++++++++++ Makefile | 2 ++ 2 files changed, 15 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 628a234..5da79e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,13 @@ pipeline { agent { node { label 'podman-aws-trivy' } } stages { + stage('Prepare'){ + steps { + // get tags + sh 'git fetch --tags ${env.GIT_URL}" +refs/heads/${env.BRANCH_NAME}:refs/remotes/origin/${env.BRANCH_NAME}' + } + } + // Build using rootless podman stage('Build'){ steps { @@ -8,6 +15,12 @@ pipeline { } } + stage('Test'){ + steps { + sh 'make test' + } + } + // Scan via trivy stage('Scan'){ environment { diff --git a/Makefile b/Makefile index a2493af..7df8e28 100644 --- a/Makefile +++ b/Makefile @@ -27,3 +27,5 @@ push: scan: trivy $(TRIVY_OPTS) $(REPOSITORY):$(TAG) + +test: