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: