Skip to content

Commit

Permalink
sunday tests investigation
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenpip3 committed Dec 8, 2024
1 parent f9ded15 commit e23fb22
Show file tree
Hide file tree
Showing 19 changed files with 1,868 additions and 1,484 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ kind-clean: ## Delete kind cluster
@echo "+ $@"
kind delete cluster --name $(KIND_CLUSTER_NAME)

.PHONY: kind-revamp
kind-revamp: kind-clean kind-setup## Delete and recreate kind cluster
@echo "+ $@"

.PHONY: bats-tests
IMAGE_NAME := quay.io/$(QUAY_ORGANIZATION)/$(QUAY_REGISTRY):$(GITCOMMIT)-amd64
BUILD_PRESENT := $(shell docker images |grep -q ${IMAGE_NAME})
Expand Down Expand Up @@ -555,7 +559,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.17

.PHONY: operator-sdk
HAS_OPERATOR_SDK := $(shell which $(PROJECT_DIR)/bin/operator-sdk)
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions chart/jenkins-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,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.462.3-lts"` | |
| jenkins.image | string | `"jenkins/jenkins:2.479.2-lts"` | |
| jenkins.imagePullPolicy | string | `"Always"` | |
| jenkins.imagePullSecrets | list | `[]` | |
| jenkins.labels | object | `{}` | |
Expand Down Expand Up @@ -112,4 +112,4 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes
| webhook.enabled | bool | `false` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.462.3-lts
image: jenkins/jenkins:2.479.2-lts

# env contains jenkins container environment variables
env: []
Expand Down
2 changes: 1 addition & 1 deletion config.base.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GO_VERSION="1.22"
HELM_VERSION="3.12.3"
IMAGE_PULL_MODE="local"
KIND_CLUSTER_NAME="jenkins"
LATEST_LTS_VERSION="2.462.3"
LATEST_LTS_VERSION="2.479.2"
NAME="kubernetes-operator"
NAMESPACE="default"
OPERATOR_SDK_VERSION="1.35.0"
Expand Down
3,306 changes: 1,843 additions & 1,463 deletions config/crd/bases/jenkins.io_jenkins.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
1 change: 0 additions & 1 deletion config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- admissionReviewVersions:
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/jenkins_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (r *JenkinsReconciler) Reconcile(_ context.Context, request ctrl.Request) (
return reconcile.Result{Requeue: true}, nil
}
if result.Requeue && result.RequeueAfter == 0 {
result.RequeueAfter = time.Duration(rand.Intn(10)) * time.Millisecond
result.RequeueAfter = time.Duration(rand.Intn(10)) * time.Second
}
return result, nil
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/configuration/base/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ func (r *JenkinsBaseConfigurationReconciler) Reconcile() (reconcile.Result, jenk
}

result, err = r.ensureBaseConfiguration(jenkinsClient)
if err != nil {
return reconcile.Result{}, nil, err
}

return result, jenkinsClient, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const (
// SeedJobSuffix is a suffix added for all seed jobs
SeedJobSuffix = "job-dsl-seed"
// DefaultJenkinsMasterImage is the default Jenkins master docker image
DefaultJenkinsMasterImage = "jenkins/jenkins:2.462.3-lts"
DefaultJenkinsMasterImage = "jenkins/jenkins:2.479.2-lts"
// DefaultHTTPPortInt32 is the default Jenkins HTTP port
DefaultHTTPPortInt32 = int32(8080)
// DefaultSlavePortInt32 is the default Jenkins port for slaves
Expand Down
2 changes: 1 addition & 1 deletion pkg/groovy/groovy.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (g *Groovy) EnsureSingle(source, name, hash, groovyScript string) (requeue

g.jenkins.Status.AppliedGroovyScripts = appliedGroovyScripts

return true, g.k8sClient.Update(context.TODO(), g.jenkins)
return true, g.k8sClient.Status().Update(context.TODO(), g.jenkins)
}

// WaitForSecretSynchronization runs groovy script which waits to synchronize secrets in pod by k8s
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/base_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package plugins

const (
configurationAsCodePlugin = "configuration-as-code:1850.va_a_8c31d3158b_"
gitPlugin = "git:5.5.2"
gitPlugin = "git:5.6.0"
jobDslPlugin = "job-dsl:1.89"
kubernetesPlugin = "kubernetes:4295.v7fa_01b_309c95"
kubernetesCredentialsProviderPlugin = "kubernetes-credentials-provider:1.262.v2670ef7ea_0c5"
Expand Down
4 changes: 2 additions & 2 deletions test/bats/1-deploy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ diag() {
--set namespace=${DETIK_CLIENT_NAMESPACE} \
--set operator.image=${OPERATOR_IMAGE} \
--set jenkins.latestPlugins=true \
--set jenkins.image="jenkins/jenkins:2.462.3-lts" \
--set jenkins.image="jenkins/jenkins:2.479.2-lts" \
--set jenkins.imagePullPolicy="IfNotPresent" \
--set jenkins.backup.makeBackupBeforePodDeletion=false \
--set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \
Expand Down Expand Up @@ -154,7 +154,7 @@ diag() {
--set namespace=${DETIK_CLIENT_NAMESPACE} \
--set operator.image=${OPERATOR_IMAGE} \
--set jenkins.latestPlugins=true \
--set jenkins.image="jenkins/jenkins:2.462.3-lts" \
--set jenkins.image="jenkins/jenkins:2.479.2-lts" \
--set jenkins.imagePullPolicy="IfNotPresent" \
--set jenkins.backup.makeBackupBeforePodDeletion=false \
--set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \
Expand Down
4 changes: 2 additions & 2 deletions test/bats/2-deploy-with-more-options.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ setup() {
--set operator.image=${OPERATOR_IMAGE} \
--set jenkins.latestPlugins=true \
--set jenkins.nodeSelector.batstest=yep \
--set jenkins.image="jenkins/jenkins:2.462.3-lts" \
--set jenkins.image="jenkins/jenkins:2.479.2-lts" \
--set jenkins.imagePullPolicy="IfNotPresent" \
--set jenkins.backup.makeBackupBeforePodDeletion=false \
--set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \
Expand Down Expand Up @@ -103,7 +103,7 @@ setup() {
--set operator.image=${OPERATOR_IMAGE} \
--set jenkins.latestPlugins=true \
--set jenkins.nodeSelector.batstest=yep \
--set jenkins.image="jenkins/jenkins:2.462.3-lts" \
--set jenkins.image="jenkins/jenkins:2.479.2-lts" \
--set jenkins.imagePullPolicy="IfNotPresent" \
--set jenkins.backup.makeBackupBeforePodDeletion=false \
--set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \
Expand Down
4 changes: 2 additions & 2 deletions test/bats/3-deploy-with-webhook.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ setup() {
--set namespace=${DETIK_CLIENT_NAMESPACE} \
--set operator.image=${OPERATOR_IMAGE} \
--set jenkins.latestPlugins=true \
--set jenkins.image="jenkins/jenkins:2.462.3-lts" \
--set jenkins.image="jenkins/jenkins:2.479.2-lts" \
--set jenkins.imagePullPolicy="IfNotPresent" \
--set jenkins.backup.makeBackupBeforePodDeletion=true \
--set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \
Expand Down Expand Up @@ -90,7 +90,7 @@ setup() {
--set namespace=${DETIK_CLIENT_NAMESPACE} \
--set operator.image=${OPERATOR_IMAGE} \
--set jenkins.latestPlugins=true \
--set jenkins.image="jenkins/jenkins:2.462.3-lts" \
--set jenkins.image="jenkins/jenkins:2.479.2-lts" \
--set jenkins.imagePullPolicy="IfNotPresent" \
--set jenkins.backup.makeBackupBeforePodDeletion=true \
--set jenkins.backup.image=quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test \
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const e2e = "e2e"

var expectedBasePluginsList = []plugins.Plugin{
plugins.Must(plugins.New("configuration-as-code:1850.va_a_8c31d3158b_")),
plugins.Must(plugins.New("git:5.5.2")),
plugins.Must(plugins.New("git:5.6.0")),
plugins.Must(plugins.New("kubernetes:4295.v7fa_01b_309c95")),
plugins.Must(plugins.New("kubernetes-credentials-provider:1.262.v2670ef7ea_0c5")),
plugins.Must(plugins.New("job-dsl:1.89")),
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.462.3-lts"
const JenkinsTestImage = "jenkins/jenkins:2.479.2-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.462.3-lts"),
"--set-string", fmt.Sprintf("jenkins.image=%s", "jenkins/jenkins:2.479.2-lts"),
"--set-string", fmt.Sprintf("operator.image=%s", *imageName),
"--set-string", fmt.Sprintf("backup.image=%s", "quay.io/jenkins-kubernetes-operator/backup-pvc:e2e-test"),
"--set-string", fmt.Sprintf("jenkins.imagePullPolicy=%s", "IfNotPresent"), "--install")
Expand Down

0 comments on commit e23fb22

Please sign in to comment.