Skip to content

Commit 7629329

Browse files
committed
Add missing annotation. Add logging.
1 parent bac0bca commit 7629329

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

openshift-with-appstudio-test/e2e/jvm_build_service_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import (
88
)
99

1010
func TestExampleRun(t *testing.T) {
11-
runBasicTests(t, setup, testNamespace)
11+
runBasicTests(t, setupE2E, testNamespace)
1212
}

openshift-with-appstudio-test/e2e/periodic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
)
2121

2222
func runTests(t *testing.T, namespace string, runYaml string) {
23-
ta := setup(t, namespace)
23+
ta := setupE2E(t, namespace)
2424

2525
countQuota := &corev1.ResourceQuota{
2626
ObjectMeta: metav1.ObjectMeta{

openshift-with-appstudio-test/e2e/util.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,7 @@ func commonSetup(t *testing.T, gitCloneUrl string, namespace string) *testArgs {
243243
}
244244
return ta
245245
}
246-
func setup(t *testing.T, namespace string) *testArgs {
247-
return setupConfig(t, namespace)
248-
}
249-
func setupConfig(t *testing.T, namespace string) *testArgs {
250-
246+
func setupE2E(t *testing.T, namespace string) *testArgs {
251247
ta := commonSetup(t, gitCloneTaskUrl, namespace)
252248
err := wait.PollUntilContextTimeout(context.TODO(), 1*time.Second, 1*time.Minute, true, func(ctx context.Context) (done bool, err error) {
253249
_, err = kubeClient.CoreV1().ServiceAccounts(ta.ns).Get(context.TODO(), "pipeline", metav1.GetOptions{})
@@ -292,8 +288,9 @@ func setupConfig(t *testing.T, namespace string) *testArgs {
292288

293289
jbsConfig := v1alpha1.JBSConfig{
294290
ObjectMeta: metav1.ObjectMeta{
295-
Namespace: ta.ns,
296-
Name: v1alpha1.JBSConfigName,
291+
Namespace: ta.ns,
292+
Name: v1alpha1.JBSConfigName,
293+
Annotations: map[string]string{jbsconfig.CITests: "true"},
297294
},
298295
Spec: v1alpha1.JBSConfigSpec{
299296
EnableRebuilds: true,
@@ -1066,8 +1063,9 @@ func setupMinikube(t *testing.T, namespace string) *testArgs {
10661063
ObjectMeta: metav1.ObjectMeta{
10671064
Namespace: ta.ns,
10681065
Name: v1alpha1.JBSConfigName,
1069-
Annotations: map[string]string{jbsconfig.TestRegistry: strconv.FormatBool(insecure),
1070-
jbsconfig.CITests: "true"},
1066+
Annotations: map[string]string{
1067+
jbsconfig.TestRegistry: strconv.FormatBool(insecure),
1068+
jbsconfig.CITests: "true"},
10711069
},
10721070
Spec: v1alpha1.JBSConfigSpec{
10731071
EnableRebuilds: true,

pkg/reconciler/dependencybuild/dependencybuild.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ func (r *ReconcileDependencyBuild) handleStateBuilding(ctx context.Context, db *
649649
}
650650
}
651651
if jbsConfig.Annotations != nil && jbsConfig.Annotations[jbsconfig.CITests] == "true" {
652+
log.Info(fmt.Sprintf("Configuring resources for %#v", BuildTaskName))
652653
podMemR, _ := resource.ParseQuantity("1792Mi")
653654
podMemL, _ := resource.ParseQuantity("3584Mi")
654655
podCPU, _ := resource.ParseQuantity("500m")
@@ -1460,6 +1461,7 @@ func (r *ReconcileDependencyBuild) handleStateDeploying(ctx context.Context, db
14601461
}
14611462
}
14621463
if jbsConfig.Annotations != nil && jbsConfig.Annotations[jbsconfig.CITests] == "true" {
1464+
log.Info(fmt.Sprintf("Configuring resources for %#v", DeployTaskName))
14631465
podMem, _ := resource.ParseQuantity("1024Mi")
14641466
podCPU, _ := resource.ParseQuantity("250m")
14651467
pr.Spec.TaskRunSpecs = []tektonpipeline.PipelineTaskRunSpec{{

0 commit comments

Comments
 (0)