chore: update to latest lts, update plugins, remove devbots, add devcontainer (#835)
Update to the latest lts Update plugins Remove devbots Initial devcontainer config
This commit is contained in:
		
							parent
							
								
									5058fc2a6e
								
							
						
					
					
						commit
						7bccdc21b1
					
				|  | @ -1,4 +0,0 @@ | ||||||
| # Configuration for devbots-needs-triage - https://devbots.xyz/documentation/needs-triage/ |  | ||||||
| 
 |  | ||||||
| enabled: true |  | ||||||
| label: "needs triage" |  | ||||||
|  | @ -0,0 +1,43 @@ | ||||||
|  | // For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||||||
|  | // README at: https://github.com/devcontainers/templates/tree/main/src/kubernetes-helm-minikube | ||||||
|  | { | ||||||
|  | 	"name": "Kubernetes - Minikube-in-Docker", | ||||||
|  | 	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||||||
|  | 	"image": "mcr.microsoft.com/devcontainers/base:bullseye", | ||||||
|  | 
 | ||||||
|  | 	"features": { | ||||||
|  | 		"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||||||
|  | 			"enableNonRootDocker": "true", | ||||||
|  | 			"moby": "true" | ||||||
|  | 		}, | ||||||
|  | 		"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { | ||||||
|  | 			"version": "latest", | ||||||
|  | 			"helm": "latest", | ||||||
|  | 			"minikube": "latest" | ||||||
|  | 		}, | ||||||
|  | 		"ghcr.io/devcontainers/features/go:1": { | ||||||
|  | 			"version": "1.15", | ||||||
|  | 			"golangciLintVersion": "1.26.0" | ||||||
|  | 		}, | ||||||
|  | 		"ghcr.io/mpriscella/features/kind:1": { | ||||||
|  | 			"version": "latest" | ||||||
|  | 		}, | ||||||
|  | 		"ghcr.io/edouard-lopez/devcontainer-features/bats:0": { | ||||||
|  | 			"version": "latest" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||||||
|  | 	// "forwardPorts": [], | ||||||
|  | 
 | ||||||
|  | 	// Use 'postCreateCommand' to run commands after the container is created. | ||||||
|  | 	// "postCreateCommand": "kubectl version", | ||||||
|  | 
 | ||||||
|  | 	// Use 'postStartCommand' to run commands after the container is created like starting minikube. | ||||||
|  | 	// "postStartCommand": "nohup bash -c 'minikube start &' > minikube.log 2>&1", | ||||||
|  | 
 | ||||||
|  | 	// Configure tool-specific properties. | ||||||
|  | 	// "customizations": {}, | ||||||
|  | 
 | ||||||
|  | 	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||||||
|  | 	// "remoteUser": "root" | ||||||
|  | } | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| # jenkins-operator | # jenkins-operator | ||||||
| 
 | 
 | ||||||
|   |   | ||||||
| 
 | 
 | ||||||
| Kubernetes native operator which fully manages Jenkins on Kubernetes | Kubernetes native operator which fully manages Jenkins on Kubernetes | ||||||
| 
 | 
 | ||||||
|  | @ -52,7 +52,7 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes | ||||||
| | jenkins.enabled | bool | `true` |  | | | jenkins.enabled | bool | `true` |  | | ||||||
| | jenkins.env | list | `[]` |  | | | jenkins.env | list | `[]` |  | | ||||||
| | jenkins.hostAliases | object | `{}` |  | | | jenkins.hostAliases | object | `{}` |  | | ||||||
| | jenkins.image | string | `"jenkins/jenkins:2.387.2-lts"` |  | | | jenkins.image | string | `"jenkins/jenkins:2.387.3-lts"` |  | | ||||||
| | jenkins.imagePullPolicy | string | `"Always"` |  | | | jenkins.imagePullPolicy | string | `"Always"` |  | | ||||||
| | jenkins.imagePullSecrets | list | `[]` |  | | | jenkins.imagePullSecrets | list | `[]` |  | | ||||||
| | jenkins.labels | object | `{}` |  | | | jenkins.labels | object | `{}` |  | | ||||||
|  |  | ||||||
|  | @ -33,7 +33,7 @@ jenkins: | ||||||
|   # image is the name (and tag) of the Jenkins instance |   # image is the name (and tag) of the Jenkins instance | ||||||
|   # Default: jenkins/jenkins:lts |   # Default: jenkins/jenkins:lts | ||||||
|   # It's recommended to use LTS (tag: "lts") version |   # It's recommended to use LTS (tag: "lts") version | ||||||
|   image: jenkins/jenkins:2.387.2-lts |   image: jenkins/jenkins:2.387.3-lts | ||||||
| 
 | 
 | ||||||
|   # env contains jenkins container environment variables |   # env contains jenkins container environment variables | ||||||
|   env: [] |   env: [] | ||||||
|  | @ -87,13 +87,13 @@ jenkins: | ||||||
|   # |   # | ||||||
|   # basePlugins: |   # basePlugins: | ||||||
|   # - name: kubernetes |   # - name: kubernetes | ||||||
|   #   version: 3909.v1f2c633e8590 |   #   version: 3923.v294a_d4250b_91 | ||||||
|   # - name: workflow-job |   # - name: workflow-job | ||||||
|   #   version: 1289.vd1c337fd5354 |   #   version: 1292.v27d8cc3e2602 | ||||||
|   # - name: workflow-aggregator |   # - name: workflow-aggregator | ||||||
|   #   version: 596.v8c21c963d92d |   #   version: 596.v8c21c963d92d | ||||||
|   # - name: git |   # - name: git | ||||||
|   #   version: 5.0.0 |   #   version: 5.0.1 | ||||||
|   # - name: job-dsl |   # - name: job-dsl | ||||||
|   #   version: "1.83" |   #   version: "1.83" | ||||||
|   # - name: configuration-as-code |   # - name: configuration-as-code | ||||||
|  |  | ||||||
|  | @ -13,5 +13,5 @@ GEN_CRD_API=gen-crd-api-reference-docs | ||||||
| IMAGE_PULL_MODE=local | IMAGE_PULL_MODE=local | ||||||
| HELM_VERSION=3.1.2 | HELM_VERSION=3.1.2 | ||||||
| CLUSTER_DOMAIN=cluster.local | CLUSTER_DOMAIN=cluster.local | ||||||
| LATEST_LTS_VERSION=2.387.2 | LATEST_LTS_VERSION=2.387.3 | ||||||
| KIND_CLUSTER_NAME=jenkins | KIND_CLUSTER_NAME=jenkins | ||||||
|  |  | ||||||
|  | @ -2,12 +2,12 @@ package plugins | ||||||
| 
 | 
 | ||||||
| const ( | const ( | ||||||
| 	configurationAsCodePlugin           = "configuration-as-code:1625.v27444588cc3d" | 	configurationAsCodePlugin           = "configuration-as-code:1625.v27444588cc3d" | ||||||
| 	gitPlugin                           = "git:5.0.0" | 	gitPlugin                           = "git:5.0.1" | ||||||
| 	jobDslPlugin                        = "job-dsl:1.83" | 	jobDslPlugin                        = "job-dsl:1.83" | ||||||
| 	kubernetesPlugin                    = "kubernetes:3909.v1f2c633e8590" | 	kubernetesPlugin                    = "kubernetes:3923.v294a_d4250b_91" | ||||||
| 	kubernetesCredentialsProviderPlugin = "kubernetes-credentials-provider:1.211.vc236a_f5a_2f3c" | 	kubernetesCredentialsProviderPlugin = "kubernetes-credentials-provider:1.211.vc236a_f5a_2f3c" | ||||||
| 	workflowAggregatorPlugin            = "workflow-aggregator:596.v8c21c963d92d" | 	workflowAggregatorPlugin            = "workflow-aggregator:596.v8c21c963d92d" | ||||||
| 	workflowJobPlugin                   = "workflow-job:1289.vd1c337fd5354" | 	workflowJobPlugin                   = "workflow-job:1292.v27d8cc3e2602" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // basePluginsList contains plugins to install by operator.
 | // basePluginsList contains plugins to install by operator.
 | ||||||
|  |  | ||||||
|  | @ -25,12 +25,12 @@ const e2e = "e2e" | ||||||
| 
 | 
 | ||||||
| var expectedBasePluginsList = []plugins.Plugin{ | var expectedBasePluginsList = []plugins.Plugin{ | ||||||
| 	plugins.Must(plugins.New("configuration-as-code:1625.v27444588cc3d")), | 	plugins.Must(plugins.New("configuration-as-code:1625.v27444588cc3d")), | ||||||
| 	plugins.Must(plugins.New("git:5.0.0")), | 	plugins.Must(plugins.New("git:5.0.1")), | ||||||
| 	plugins.Must(plugins.New("kubernetes:3909.v1f2c633e8590")), | 	plugins.Must(plugins.New("kubernetes:3923.v294a_d4250b_91")), | ||||||
| 	plugins.Must(plugins.New("kubernetes-credentials-provider:1.211.vc236a_f5a_2f3c")), | 	plugins.Must(plugins.New("kubernetes-credentials-provider:1.211.vc236a_f5a_2f3c")), | ||||||
| 	plugins.Must(plugins.New("job-dsl:1.83")), | 	plugins.Must(plugins.New("job-dsl:1.83")), | ||||||
| 	plugins.Must(plugins.New("workflow-aggregator:596.v8c21c963d92d")), | 	plugins.Must(plugins.New("workflow-aggregator:596.v8c21c963d92d")), | ||||||
| 	plugins.Must(plugins.New("workflow-job:1289.vd1c337fd5354")), | 	plugins.Must(plugins.New("workflow-job:1292.v27d8cc3e2602")), | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func createUserConfigurationSecret(namespace string, stringData map[string]string) { | func createUserConfigurationSecret(namespace string, stringData map[string]string) { | ||||||
|  |  | ||||||
|  | @ -244,7 +244,7 @@ func restartJenkinsMasterPod(jenkins *v1alpha2.Jenkins) { | ||||||
| 	Eventually(func() (bool, error) { | 	Eventually(func() (bool, error) { | ||||||
| 		jenkinsPod = getJenkinsMasterPod(jenkins) | 		jenkinsPod = getJenkinsMasterPod(jenkins) | ||||||
| 		return jenkinsPod.DeletionTimestamp != nil, nil | 		return jenkinsPod.DeletionTimestamp != nil, nil | ||||||
| 	}, 30*retryInterval, retryInterval).Should(BeTrue()) | 	}, 45*retryInterval, retryInterval).Should(BeTrue()) | ||||||
| 
 | 
 | ||||||
| 	_, _ = fmt.Fprintf(GinkgoWriter, "Jenkins master pod has been restarted\n") | 	_, _ = fmt.Fprintf(GinkgoWriter, "Jenkins master pod has been restarted\n") | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ import ( | ||||||
| 	"sigs.k8s.io/controller-runtime/pkg/envtest" | 	"sigs.k8s.io/controller-runtime/pkg/envtest" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| const JenkinsTestImage = "jenkins/jenkins:2.387.2-lts" | const JenkinsTestImage = "jenkins/jenkins:2.387.3-lts" | ||||||
| 
 | 
 | ||||||
| var ( | var ( | ||||||
| 	Cfg       *rest.Config | 	Cfg       *rest.Config | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ var _ = Describe("Jenkins Controller", func() { | ||||||
| 
 | 
 | ||||||
| 			cmd := exec.Command("../../bin/helm", "upgrade", "jenkins", "../../chart/jenkins-operator", "--namespace", namespace.Name, "--debug", | 			cmd := exec.Command("../../bin/helm", "upgrade", "jenkins", "../../chart/jenkins-operator", "--namespace", namespace.Name, "--debug", | ||||||
| 				"--set-string", fmt.Sprintf("jenkins.namespace=%s", namespace.Name), | 				"--set-string", fmt.Sprintf("jenkins.namespace=%s", namespace.Name), | ||||||
| 				"--set-string", fmt.Sprintf("jenkins.image=%s", "jenkins/jenkins:2.387.2-lts"), | 				"--set-string", fmt.Sprintf("jenkins.image=%s", "jenkins/jenkins:2.387.3-lts"), | ||||||
| 				"--set-string", fmt.Sprintf("operator.image=%s", *imageName), "--install") | 				"--set-string", fmt.Sprintf("operator.image=%s", *imageName), "--install") | ||||||
| 			output, err := cmd.CombinedOutput() | 			output, err := cmd.CombinedOutput() | ||||||
| 			Expect(err).NotTo(HaveOccurred(), string(output)) | 			Expect(err).NotTo(HaveOccurred(), string(output)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue