From f5892aa7db9712b954cde0fe37580982712af1d6 Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Sat, 5 Apr 2025 18:09:14 +0200 Subject: [PATCH] remove devoptics plugin since will cause a clbo, use another one to test the download url, also preload the jenkins image in kind --- Makefile | 8 +++++++- kind-cluster.yaml | 4 +++- test/e2e/jenkins_test.go | 2 +- test/e2e/test_utility.go | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3edc8fb4..7d4570a9 100644 --- a/Makefile +++ b/Makefile @@ -93,11 +93,17 @@ test: ## Runs the go tests @RUNNING_TESTS=1 go test -tags "$(BUILDTAGS) cgo" $(PACKAGES_FOR_UNIT_TESTS) .PHONY: e2e -e2e: deepcopy-gen manifests backup-kind-load ## Runs e2e tests, you can use EXTRA_ARGS +e2e: deepcopy-gen manifests backup-kind-load jenkins-kind-load ## Runs e2e tests, you can use EXTRA_ARGS @echo "+ $@" RUNNING_TESTS=1 go test -parallel=1 "./test/e2e/" -ginkgo.v -tags "$(BUILDTAGS) cgo" -v -timeout 60m -run "$(E2E_TEST_SELECTOR)" \ -jenkins-api-hostname=$(JENKINS_API_HOSTNAME) -jenkins-api-port=$(JENKINS_API_PORT) -jenkins-api-use-nodeport=$(JENKINS_API_USE_NODEPORT) $(E2E_TEST_ARGS) +.PHONY: jenkins-kind-load +jenkins-kind-load: ## Load the jenkins lts version in kind to speed up tests + @echo "+ $@" + docker pull jenkins/jenkins:$(LATEST_LTS_VERSION) + kind load docker-image jenkins/jenkins:$(LATEST_LTS_VERSION) --name $(KIND_CLUSTER_NAME) + ## Backup Section .PHONY: backup-kind-load diff --git a/kind-cluster.yaml b/kind-cluster.yaml index 726f6137..13407a21 100644 --- a/kind-cluster.yaml +++ b/kind-cluster.yaml @@ -1,9 +1,11 @@ apiVersion: kind.x-k8s.io/v1alpha4 kind: Cluster +networking: + dnsSearch: [] nodes: - role: control-plane extraPortMappings: - containerPort: 30303 hostPort: 30303 listenAddress: "0.0.0.0" - protocol: tcp \ No newline at end of file + protocol: tcp diff --git a/test/e2e/jenkins_test.go b/test/e2e/jenkins_test.go index d2572d76..858c43ed 100644 --- a/test/e2e/jenkins_test.go +++ b/test/e2e/jenkins_test.go @@ -128,7 +128,7 @@ func createJenkinsCRSafeRestart(name, namespace string, seedJob *[]v1alpha2.Seed {Name: "audit-trail", Version: "361.v82cde86c784e"}, {Name: "simple-theme-plugin", Version: "176.v39740c03a_a_f5"}, {Name: "github", Version: "1.38.0"}, - {Name: "devoptics", Version: "2.0", DownloadURL: "https://jenkins-updates.cloudbees.com/download/plugins/devoptics/2.0/devoptics.hpi"}, + {Name: "cloudbees-disk-usage-simple", Version: "239.v6a_f1a_c1c8046", DownloadURL: "https://jenkins-updates.cloudbees.com/download/plugins/cloudbees-disk-usage-simple/239.v6a_f1a_c1c8046/cloudbees-disk-usage-simple.hpi"}, }, PriorityClassName: priorityClassName, NodeSelector: map[string]string{"kubernetes.io/os": "linux"}, diff --git a/test/e2e/test_utility.go b/test/e2e/test_utility.go index c046f704..f4005e9a 100644 --- a/test/e2e/test_utility.go +++ b/test/e2e/test_utility.go @@ -151,7 +151,7 @@ func RenderJenkinsCR(name, namespace string, seedJob *[]v1alpha2.SeedJob, groovy {Name: "audit-trail", Version: "361.v82cde86c784e"}, {Name: "simple-theme-plugin", Version: "176.v39740c03a_a_f5"}, {Name: "github", Version: "1.38.0"}, - {Name: "devoptics", Version: "2.0", DownloadURL: "https://jenkins-updates.cloudbees.com/download/plugins/devoptics/2.0/devoptics.hpi"}, + {Name: "cloudbees-disk-usage-simple", Version: "239.v6a_f1a_c1c8046", DownloadURL: "https://jenkins-updates.cloudbees.com/download/plugins/cloudbees-disk-usage-simple/239.v6a_f1a_c1c8046/cloudbees-disk-usage-simple.hpi"}, }, PriorityClassName: priorityClassName, NodeSelector: map[string]string{"kubernetes.io/os": "linux"},