From f28e93b4ba5dd220a819a47ea896b0747ded99e2 Mon Sep 17 00:00:00 2001 From: Robert Auer Date: Tue, 5 Sep 2023 09:37:36 +0200 Subject: [PATCH] Pass Makefile object to functions that are using it --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5042b7c..47b8aac 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ node('docker') { } stage("Lint k8s Resources") { - stageLintK8SResources() + stageLintK8SResources(makefile) } stage('SonarQube') { @@ -114,7 +114,7 @@ node('docker') { k3d.kubectl("--namespace default wait --for=condition=Ready pods --all") } - stageAutomaticRelease() + stageAutomaticRelease(makefile) } finally { stage('Remove k3d cluster') { k3d.deleteK3d() @@ -132,7 +132,7 @@ void gitWithCredentials(String command) { } } -void stageLintK8SResources() { +void stageLintK8SResources(Makefile makefile) { String kubevalImage = "cytopia/kubeval:0.13" String controllerVersion = makefile.getVersion() @@ -185,7 +185,7 @@ void stageStaticAnalysisSonarQube() { } } -void stageAutomaticRelease() { +void stageAutomaticRelease(Makefile makefile) { if (gitflow.isReleaseBranch()) { String releaseVersion = git.getSimpleBranchName() String dockerReleaseVersion = releaseVersion.split("v")[1]