Skip to content

Commit

Permalink
chore: update to latest lts, update plugins, remove devbots, add devc…
Browse files Browse the repository at this point in the history
…ontainer (#835)

Update to the latest lts
Update plugins
Remove devbots
Initial devcontainer config
  • Loading branch information
brokenpip3 authored May 8, 2023
1 parent 5058fc2 commit 7bccdc2
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 20 deletions.
4 changes: 0 additions & 4 deletions .devbots/needs-triage.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions chart/jenkins-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# jenkins-operator

![Version: 0.6.2](https://img.shields.io/badge/Version-0.6.2-informational?style=flat-square) ![AppVersion: 0.7.1](https://img.shields.io/badge/AppVersion-0.7.1-informational?style=flat-square)
![Version: v0.8.0-beta](https://img.shields.io/badge/Version-v0.8.0--beta-informational?style=flat-square) ![AppVersion: v0.8.0-beta](https://img.shields.io/badge/AppVersion-v0.8.0--beta-informational?style=flat-square)

Kubernetes native operator which fully manages Jenkins on Kubernetes

Expand Down Expand Up @@ -52,7 +52,7 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes
| jenkins.enabled | bool | `true` | |
| jenkins.env | list | `[]` | |
| 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.imagePullSecrets | list | `[]` | |
| jenkins.labels | object | `{}` | |
Expand Down
8 changes: 4 additions & 4 deletions chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jenkins:
# image is the name (and tag) of the Jenkins instance
# Default: jenkins/jenkins:lts
# 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: []
Expand Down Expand Up @@ -87,13 +87,13 @@ jenkins:
#
# basePlugins:
# - name: kubernetes
# version: 3909.v1f2c633e8590
# version: 3923.v294a_d4250b_91
# - name: workflow-job
# version: 1289.vd1c337fd5354
# version: 1292.v27d8cc3e2602
# - name: workflow-aggregator
# version: 596.v8c21c963d92d
# - name: git
# version: 5.0.0
# version: 5.0.1
# - name: job-dsl
# version: "1.83"
# - name: configuration-as-code
Expand Down
2 changes: 1 addition & 1 deletion config.base.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ GEN_CRD_API=gen-crd-api-reference-docs
IMAGE_PULL_MODE=local
HELM_VERSION=3.1.2
CLUSTER_DOMAIN=cluster.local
LATEST_LTS_VERSION=2.387.2
LATEST_LTS_VERSION=2.387.3
KIND_CLUSTER_NAME=jenkins
6 changes: 3 additions & 3 deletions pkg/plugins/base_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package plugins

const (
configurationAsCodePlugin = "configuration-as-code:1625.v27444588cc3d"
gitPlugin = "git:5.0.0"
gitPlugin = "git:5.0.1"
jobDslPlugin = "job-dsl:1.83"
kubernetesPlugin = "kubernetes:3909.v1f2c633e8590"
kubernetesPlugin = "kubernetes:3923.v294a_d4250b_91"
kubernetesCredentialsProviderPlugin = "kubernetes-credentials-provider:1.211.vc236a_f5a_2f3c"
workflowAggregatorPlugin = "workflow-aggregator:596.v8c21c963d92d"
workflowJobPlugin = "workflow-job:1289.vd1c337fd5354"
workflowJobPlugin = "workflow-job:1292.v27d8cc3e2602"
)

// basePluginsList contains plugins to install by operator.
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ const e2e = "e2e"

var expectedBasePluginsList = []plugins.Plugin{
plugins.Must(plugins.New("configuration-as-code:1625.v27444588cc3d")),
plugins.Must(plugins.New("git:5.0.0")),
plugins.Must(plugins.New("kubernetes:3909.v1f2c633e8590")),
plugins.Must(plugins.New("git:5.0.1")),
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("job-dsl:1.83")),
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) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/jenkins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func restartJenkinsMasterPod(jenkins *v1alpha2.Jenkins) {
Eventually(func() (bool, error) {
jenkinsPod = getJenkinsMasterPod(jenkins)
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")
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test_utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
)

const JenkinsTestImage = "jenkins/jenkins:2.387.2-lts"
const JenkinsTestImage = "jenkins/jenkins:2.387.3-lts"

var (
Cfg *rest.Config
Expand Down
2 changes: 1 addition & 1 deletion test/helm/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var _ = Describe("Jenkins Controller", func() {

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.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")
output, err := cmd.CombinedOutput()
Expect(err).NotTo(HaveOccurred(), string(output))
Expand Down

0 comments on commit 7bccdc2

Please sign in to comment.