@@ -14,6 +14,7 @@ Docker docker = new Docker(this)
1414gpg = new Gpg (this , docker)
1515goVersion = " 1.25.1"
1616makefile = new Makefile (this )
17+ componentOperatorCrdVersion= " 1.11.0"
1718
1819// Configuration of repository
1920repositoryOwner = " cloudogu"
@@ -23,7 +24,6 @@ registry = "registry.cloudogu.com"
2324registry_namespace = " k8s"
2425k8sTargetDir = " target/k8s"
2526helmChartDir = " ${ k8sTargetDir} /helm"
26- helmCRDChartDir = " ${ k8sTargetDir} /helm-crd"
2727
2828// Configuration of branches
2929productionReleaseBranch = " main"
@@ -64,13 +64,11 @@ node('docker') {
6464 }
6565
6666 stage(' Generate k8s Resources' ) {
67- make ' crd-helm-generate'
6867 make ' helm-generate'
6968 archiveArtifacts " ${ k8sTargetDir} /**/*"
7069 }
7170
7271 stage(" Lint helm" ) {
73- make ' crd-helm-lint'
7472 make ' helm-lint'
7573 }
7674 }
@@ -88,6 +86,13 @@ node('docker') {
8886 k3d. startK3d()
8987 }
9088
89+ stage(' Deploy crd' ) {
90+ withCredentials([[$class : ' UsernamePasswordMultiBinding' , credentialsId : ' harborhelmchartpush' , usernameVariable : ' HARBOR_USERNAME' , passwordVariable : ' HARBOR_PASSWORD' ]]) {
91+ k3d. helm(" registry login ${ registry} --username '${ HARBOR_USERNAME} ' --password '${ HARBOR_PASSWORD} '" )
92+ k3d. helm(" install k8s-component-operator-crd oci://${ registry} /${ registry_namespace} /k8s-component-operator-crd --version ${ componentOperatorCrdVersion} " )
93+ }
94+ }
95+
9196 def imageName = " "
9297 stage(' Build & Push Image' ) {
9398 imageName = k3d. buildAndPushToLocalRegistry(" cloudogu/${ repositoryName} " , controllerVersion)
@@ -103,7 +108,6 @@ node('docker') {
103108 }
104109
105110 stage(' Deploy Manager' ) {
106- k3d. helm(" install ${ repositoryName} -crd ${ helmCRDChartDir} " )
107111 k3d. helm(" install ${ repositoryName} ${ helmChartDir} " )
108112 }
109113
@@ -200,17 +204,15 @@ void stageAutomaticRelease() {
200204 .mountJenkinsUser()
201205 .inside(" --volume ${ WORKSPACE} :/go/src/${ project} -w /go/src/${ project} " )
202206 {
203- // Package operator-chart & crd-chart
207+ // Package operator-chart
204208 make ' helm-package'
205- make ' crd-helm-package'
206209 archiveArtifacts " ${ k8sTargetDir} /**/*"
207210
208211 // Push charts
209212 withCredentials([usernamePassword(credentialsId : ' harborhelmchartpush' , usernameVariable : ' HARBOR_USERNAME' , passwordVariable : ' HARBOR_PASSWORD' )]) {
210213 sh " .bin/helm registry login ${ registry} --username '${ HARBOR_USERNAME} ' --password '${ HARBOR_PASSWORD} '"
211214
212215 sh " .bin/helm push ${ helmChartDir} /${ repositoryName} -${ controllerVersion} .tgz oci://${ registry} /${ registry_namespace} /"
213- sh " .bin/helm push ${ helmCRDChartDir} /${ repositoryName} -crd-${ controllerVersion} .tgz oci://${ registry} /${ registry_namespace} /"
214216 }
215217 }
216218 }
0 commit comments