Files
kubernetes-operator/test/e2e/mode_openshift.go
T
Szymon Fugas e8414c09a8 chore: enable manual run of nightly builds with possibility of skipping tests (#712)
* Add manual dispatch trigger for nightly build workflow, with an input parameter for optionally skipping the e2e and helm tests part of the workflow

* Bump how much memory to start minikube cluster with on e2e test workflows

* Log events from default namespace on tests failure, bump the limit of kubernetes events logged to 30

* Bump workflow-job plugin version used by default from 2.42 to 1145.v7f2433caa07f
2022-02-10 18:03:08 +01:00

40 lines
1.1 KiB
Go

//go:build OpenShift
// +build OpenShift
package e2e
import (
"github.com/jenkinsci/kubernetes-operator/api/v1alpha2"
"github.com/jenkinsci/kubernetes-operator/pkg/configuration/base/resources"
corev1 "k8s.io/api/core/v1"
)
const (
skipTestSafeRestart = false
skipTestPriorityClass = true
)
func updateJenkinsCR(jenkins *v1alpha2.Jenkins) {
jenkins.Spec.Master.Containers[0].Image = "quay.io/openshift/origin-jenkins"
jenkins.Spec.Master.Containers[0].Command = []string{
"bash",
"-c",
"/var/jenkins/scripts/init.sh && exec /usr/bin/go-init -main /usr/libexec/s2i/run",
}
jenkins.Spec.Master.Containers[0].Env = append(jenkins.Spec.Master.Containers[0].Env,
corev1.EnvVar{
Name: "JENKINS_SERVICE_NAME",
Value: resources.GetJenkinsHTTPServiceName(jenkins),
},
corev1.EnvVar{
Name: "JNLP_SERVICE_NAME",
Value: resources.GetJenkinsSlavesServiceName(jenkins),
},
)
if len(jenkins.Spec.Master.Plugins) == 4 && jenkins.Spec.Master.Plugins[3].Name == "devoptics" {
jenkins.Spec.Master.Plugins = jenkins.Spec.Master.Plugins[0:3] // remove devoptics plugin
}
}