diff --git a/deploy/tasks/maven-deployment.yaml b/deploy/tasks/maven-deployment.yaml index d2712cebc..fef45a24b 100644 --- a/deploy/tasks/maven-deployment.yaml +++ b/deploy/tasks/maven-deployment.yaml @@ -95,11 +95,6 @@ spec: name: trusted-ca readOnly: true env: - - name: MAVEN_PASSWORD - valueFrom: - secretKeyRef: - name: $(params.MVN_PASSWORD) - key: mavenpassword - name: ACCESS_TOKEN value: $(params.ACCESS_TOKEN) args: diff --git a/pkg/reconciler/dependencybuild/dependencybuild.go b/pkg/reconciler/dependencybuild/dependencybuild.go index 9edb859ce..44bfc1b8f 100644 --- a/pkg/reconciler/dependencybuild/dependencybuild.go +++ b/pkg/reconciler/dependencybuild/dependencybuild.go @@ -624,18 +624,31 @@ func (r *ReconcileDependencyBuild) handleStateBuilding(ctx context.Context, db * } } + trueBool := true + pr.Spec.TaskRunSpecs = []tektonpipeline.PipelineTaskRunSpec{{ + PipelineTaskName: DeployTaskName, + PodTemplate: &pod.Template{ + Env: []v1.EnvVar{ + { + Name: "MAVEN_PASSWORD", + ValueFrom: &v1.EnvVarSource{SecretKeyRef: &v1.SecretKeySelector{LocalObjectReference: v1.LocalObjectReference{Name: v1alpha1.MavenSecretName}, Key: v1alpha1.MavenSecretKey, Optional: &trueBool}}, + }, + }, + }, + }} + if jbsConfig.Annotations != nil && jbsConfig.Annotations[jbsconfig.CITests] == "true" { log.Info(fmt.Sprintf("Configuring resources for %#v", BuildTaskName)) podMemR, _ := resource.ParseQuantity("1792Mi") podMemL, _ := resource.ParseQuantity("3584Mi") podCPU, _ := resource.ParseQuantity("500m") - pr.Spec.TaskRunSpecs = []tektonpipeline.PipelineTaskRunSpec{{ + pr.Spec.TaskRunSpecs = append(pr.Spec.TaskRunSpecs, tektonpipeline.PipelineTaskRunSpec{ PipelineTaskName: BuildTaskName, ComputeResources: &v1.ResourceRequirements{ Requests: v1.ResourceList{"memory": podMemR, "cpu": podCPU}, Limits: v1.ResourceList{"memory": podMemL, "cpu": podCPU}, }, - }} + }) } // TODO: DisableTLS defaults to true. Further the tls workspace has been removed from the build pipeline so an alternate method would be needed. //if !jbsConfig.Spec.CacheSettings.DisableTLS {