From 61493b8a2279991139bf3863869173762f2fab4e Mon Sep 17 00:00:00 2001 From: Benjamin Ernst Date: Fri, 8 Dec 2023 16:11:32 +0100 Subject: [PATCH 1/6] fix setup; add missing values.yaml to helm install --- src/com/cloudogu/ces/cesbuildlib/K3d.groovy | 2 +- test/com/cloudogu/ces/cesbuildlib/K3dTest.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/cloudogu/ces/cesbuildlib/K3d.groovy b/src/com/cloudogu/ces/cesbuildlib/K3d.groovy index 4715958e..a2a91bf0 100644 --- a/src/com/cloudogu/ces/cesbuildlib/K3d.groovy +++ b/src/com/cloudogu/ces/cesbuildlib/K3d.groovy @@ -311,7 +311,7 @@ class K3d { helm("registry login ${registryUrl} --username '${script.env.HARBOR_USERNAME}' --password '${script.env.HARBOR_PASSWORD}'") } - helm("install k8s-ces-setup oci://${registryUrl}/${registryNamespace}/k8s-ces-setup --version ${tag} --namespace default") + helm("install -f ${K3D_VALUES_YAML_FILE} k8s-ces-setup oci://${registryUrl}/${registryNamespace}/k8s-ces-setup --version ${tag} --namespace default") helm("registry logout ${registryUrl}") script.echo "Wait for dogu-operator to be ready..." diff --git a/test/com/cloudogu/ces/cesbuildlib/K3dTest.groovy b/test/com/cloudogu/ces/cesbuildlib/K3dTest.groovy index b65f327a..52820872 100644 --- a/test/com/cloudogu/ces/cesbuildlib/K3dTest.groovy +++ b/test/com/cloudogu/ces/cesbuildlib/K3dTest.groovy @@ -222,7 +222,7 @@ class K3dTest extends GroovyTestCase { assertThat(scriptMock.allActualArgs[2].trim()).isEqualTo("cat /etc/passwd | grep jenkins".trim()) assertThat(scriptMock.allActualArgs[3].trim()).isEqualTo("yq -i '.setup_json = load_str(\"k3d_setup.json\")' k3d_values.yaml".trim()) assertThat(scriptMock.allActualArgs[4].trim()).isEqualTo("sudo KUBECONFIG=leK3dWorkSpace/.k3d/.kube/config helm registry login registry.cloudogu.com --username 'null' --password 'null'".trim()) - assertThat(scriptMock.allActualArgs[5].trim()).isEqualTo("sudo KUBECONFIG=leK3dWorkSpace/.k3d/.kube/config helm install k8s-ces-setup oci://registry.cloudogu.com/k8s/k8s-ces-setup --version v0.6.0 --namespace default".trim()) + assertThat(scriptMock.allActualArgs[5].trim()).isEqualTo("sudo KUBECONFIG=leK3dWorkSpace/.k3d/.kube/config helm install -f k3d_values.yaml k8s-ces-setup oci://registry.cloudogu.com/k8s/k8s-ces-setup --version v0.6.0 --namespace default".trim()) assertThat(scriptMock.allActualArgs[6].trim()).isEqualTo("sudo KUBECONFIG=leK3dWorkSpace/.k3d/.kube/config helm registry logout registry.cloudogu.com".trim()) assertThat(scriptMock.allActualArgs[7].trim()).isEqualTo("sleep 1s") assertThat(scriptMock.allActualArgs[8].trim()).isEqualTo("sudo KUBECONFIG=${workspaceEnvDir}/.k3d/.kube/config kubectl rollout status deployment/k8s-dogu-operator-controller-manager".trim()) From 5f4038cc54d1adb02e20a4674c6d342daa27294c Mon Sep 17 00:00:00 2001 From: Benjamin Ernst Date: Fri, 8 Dec 2023 16:35:48 +0100 Subject: [PATCH 2/6] add changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed8f10a7..b62a534e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Add missing values.yaml as argument to helm install of k8s-ces-setup ## [2.0.0](https://github.com/cloudogu/ces-build-lib/releases/tag/2.0.0) - 2023-12-08 ### Changed From 654c6f5250dae96526bbb503c8fa92be3c224ad4 Mon Sep 17 00:00:00 2001 From: Benjamin Ernst Date: Fri, 8 Dec 2023 16:42:10 +0100 Subject: [PATCH 3/6] add nginx-static to default dogus --- src/com/cloudogu/ces/cesbuildlib/K3d.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/cloudogu/ces/cesbuildlib/K3d.groovy b/src/com/cloudogu/ces/cesbuildlib/K3d.groovy index a2a91bf0..687113ea 100644 --- a/src/com/cloudogu/ces/cesbuildlib/K3d.groovy +++ b/src/com/cloudogu/ces/cesbuildlib/K3d.groovy @@ -37,6 +37,7 @@ class K3d { dependencies : ["official/ldap", "official/cas", "k8s/nginx-ingress", + "k8s/nginx-static", "official/postfix", "official/usermgt"], defaultDogu : "", From 1090e2c976600360fced8951a4d8fdb03ee4aebe Mon Sep 17 00:00:00 2001 From: Jeremias Weber Date: Mon, 11 Dec 2023 08:06:14 +0100 Subject: [PATCH 4/6] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62a534e..ed1db525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +## [2.0.1](https://github.com/cloudogu/ces-build-lib/releases/tag/2.0.1) - 2023-12-11 ### Fixed - Add missing values.yaml as argument to helm install of k8s-ces-setup +- Add missing nginx-static to default setup.json ## [2.0.0](https://github.com/cloudogu/ces-build-lib/releases/tag/2.0.0) - 2023-12-08 ### Changed From 1057cd2d1fde12e7e02976cfca74fd25203db784 Mon Sep 17 00:00:00 2001 From: Jeremias Weber Date: Mon, 11 Dec 2023 08:06:45 +0100 Subject: [PATCH 5/6] Bump version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c8839df3..42942391 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ com.cloudogu.ces ces-build-lib ces-build-lib - 2.0.0 + 2.0.1 From 128d3b874888eb0e79145d52d4e175326671f76e Mon Sep 17 00:00:00 2001 From: Jeremias Weber Date: Mon, 11 Dec 2023 08:07:10 +0100 Subject: [PATCH 6/6] Update usage --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e2da38a..4b371881 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Jenkins Pipeline Shared library, that contains additional features for Git, Mave * Install [Pipeline: GitHub Groovy Libraries](https://wiki.jenkins.io/display/JENKINS/Pipeline+GitHub+Library+Plugin) * Use the Library in any Jenkinsfile like so ``` -@Library('github.com/cloudogu/ces-build-lib@2.0.0') +@Library('github.com/cloudogu/ces-build-lib@2.0.1') import com.cloudogu.ces.cesbuildlib.* ``` * Best practice: Use a defined version (e.g. a git commit hash or a git tag, such as `6cd41e0` or `1.67.0` in the example above) and not a branch such as `develop`. Otherwise, your build might change when the there is a new commit on the branch. Using branches is like using snapshots!