Skip to content

Commit

Permalink
Pass Makefile object to functions that are using it
Browse files Browse the repository at this point in the history
  • Loading branch information
robertauer committed Sep 5, 2023
1 parent 44d4373 commit f28e93b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ node('docker') {
}

stage("Lint k8s Resources") {
stageLintK8SResources()
stageLintK8SResources(makefile)
}

stage('SonarQube') {
Expand Down Expand Up @@ -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()
Expand All @@ -132,7 +132,7 @@ void gitWithCredentials(String command) {
}
}

void stageLintK8SResources() {
void stageLintK8SResources(Makefile makefile) {
String kubevalImage = "cytopia/kubeval:0.13"
String controllerVersion = makefile.getVersion()

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit f28e93b

Please sign in to comment.