Bump version to v0.6.0

This commit is contained in:
Mateusz Korus
2021-06-10 08:10:50 +02:00
parent e762957cc1
commit fbea1ed790
26 changed files with 483 additions and 684 deletions
+1
View File
@@ -129,6 +129,7 @@ var _ = Describe("Jenkins controller priority class", func() {
})
AfterEach(func() {
ShowLogsIfTestHasFailed(CurrentGinkgoTestDescription().Failed, namespace.Name)
DestroyNamespace(namespace)
})
+1
View File
@@ -39,6 +39,7 @@ var _ = Describe("Jenkins controller", func() {
})
AfterEach(func() {
ShowLogsIfTestHasFailed(CurrentGinkgoTestDescription().Failed, namespace.Name)
DestroyNamespace(namespace)
})
+1
View File
@@ -28,6 +28,7 @@ var _ = Describe("Jenkins controller backup and restore", func() {
})
AfterEach(func() {
ShowLogsIfTestHasFailed(CurrentGinkgoTestDescription().Failed, namespace.Name)
DestroyNamespace(namespace)
})
+2 -2
View File
@@ -96,9 +96,9 @@ func createJenkinsCR(name, namespace string, seedJob *[]v1alpha2.SeedJob, groovy
},
InitialDelaySeconds: int32(80),
TimeoutSeconds: int32(4),
FailureThreshold: int32(10),
FailureThreshold: int32(30),
SuccessThreshold: int32(1),
PeriodSeconds: int32(1),
PeriodSeconds: int32(5),
},
VolumeMounts: []corev1.VolumeMount{
{
@@ -1,4 +1,4 @@
package helm
package e2e
import (
"bytes"
@@ -7,7 +7,6 @@ import (
"io"
"sort"
"github.com/jenkinsci/kubernetes-operator/test/e2e"
"github.com/onsi/ginkgo"
corev1 "k8s.io/api/core/v1"
@@ -32,7 +31,7 @@ func getOperatorPod(namespace string) (*corev1.Pod, error) {
Namespace: namespace,
}
pods := &corev1.PodList{}
err := e2e.K8sClient.List(context.TODO(), pods, lo)
err := K8sClient.List(context.TODO(), pods, lo)
if err != nil {
return nil, err
}
@@ -47,7 +46,7 @@ func getOperatorLogs(namespace string) (string, error) {
logOptions := corev1.PodLogOptions{TailLines: &podLogTailLimit}
// creates the clientset
clientset, err := kubernetes.NewForConfig(e2e.Cfg)
clientset, err := kubernetes.NewForConfig(Cfg)
if err != nil {
return "", err
}
@@ -90,7 +89,7 @@ func getKubernetesEvents(namespace string) ([]v1beta1.Event, error) {
}
events := &v1beta1.EventList{}
err := e2e.K8sClient.List(context.TODO(), events, listOptions)
err := K8sClient.List(context.TODO(), events, listOptions)
if err != nil {
return nil, err
}
@@ -124,7 +123,7 @@ func printKubernetesPods(namespace string) {
}
}
func showLogsIfTestHasFailed(failed bool, namespace string) {
func ShowLogsIfTestHasFailed(failed bool, namespace string) {
if failed {
_, _ = fmt.Fprintf(ginkgo.GinkgoWriter, "Test failed. Bellow here you can check logs:")
+29
View File
@@ -15,6 +15,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
const pvcName = "pvc-jenkins"
@@ -114,6 +115,34 @@ func createJenkinsWithBackupAndRestoreConfigured(name, namespace string) *v1alph
MountPath: "/usr/share/jenkins/ref/plugins",
},
},
ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/login",
Port: intstr.FromString("http"),
Scheme: corev1.URISchemeHTTP,
},
},
InitialDelaySeconds: int32(100),
TimeoutSeconds: int32(4),
FailureThreshold: int32(30),
SuccessThreshold: int32(1),
PeriodSeconds: int32(5),
},
LivenessProbe: &corev1.Probe{
Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/login",
Port: intstr.FromString("http"),
Scheme: corev1.URISchemeHTTP,
},
},
InitialDelaySeconds: int32(80),
TimeoutSeconds: int32(4),
FailureThreshold: int32(30),
SuccessThreshold: int32(1),
PeriodSeconds: int32(5),
},
},
{
Name: containerName,
+1 -1
View File
@@ -23,7 +23,7 @@ var _ = Describe("Jenkins controller", func() {
namespace = e2e.CreateNamespace()
})
AfterEach(func() {
showLogsIfTestHasFailed(CurrentGinkgoTestDescription().Failed, namespace.Name)
e2e.ShowLogsIfTestHasFailed(CurrentGinkgoTestDescription().Failed, namespace.Name)
e2e.DestroyNamespace(namespace)
})
Context("when deploying Helm Chart to cluster", func() {