Skip to content

Commit 865b3c3

Browse files
committed
Remove unused environment variable setting. Pass ACCESS_TOKEN as arg.
1 parent 30d69f0 commit 865b3c3

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

deploy/tasks/maven-deployment.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ spec:
2929
description: Name of the secret holding the Maven repository password
3030
type: string
3131
- name: ACCESS_TOKEN
32-
description: Name of the secret holding the access token.
32+
description: Access token for OAuth.
3333
type: string
34+
default: ""
3435
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE
3536
description: Name of the processor image. Useful to override for development.
3637
type: string
@@ -75,11 +76,7 @@ spec:
7576
name: $(params.MVN_PASSWORD)
7677
key: mavenpassword
7778
- name: ACCESS_TOKEN
78-
valueFrom:
79-
secretKeyRef:
80-
name: $(params.ACCESS_TOKEN)
81-
key: accesstoken
82-
optional: true
79+
value: $(params.ACCESS_TOKEN)
8380
args:
8481
- deploy
8582
- --directory=/var/workdir/deployment

pkg/apis/jvmbuildservice/v1alpha1/systemconfig_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ const (
4949
KonfluxGitDefinition = "https://raw.githubusercontent.com/konflux-ci/build-definitions/refs/heads/main/task/git-clone/0.1/git-clone.yaml"
5050
KonfluxPreBuildDefinitions = "https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service/main/deploy/tasks/pre-build.yaml"
5151
KonfluxBuildDefinitions = "https://raw.githubusercontent.com/konflux-ci/build-definitions/refs/heads/main/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml"
52-
KonfluxMavenDeployDefinitions = "https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service/main/deploy/tasks/maven-deployment.yaml"
52+
KonfluxMavenDeployDefinitions = "https://raw.githubusercontent.com/rnc/jvm-build-service/TOKEN/deploy/tasks/maven-deployment.yaml"
5353
)

pkg/reconciler/dependencybuild/dependencybuild.go

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -611,24 +611,17 @@ func (r *ReconcileDependencyBuild) handleStateBuilding(ctx context.Context, db *
611611
},
612612
}},
613613
}
614-
// Setting a default environment variable to represent being run inside the operator
615-
pr.Spec.TaskRunTemplate = tektonpipeline.PipelineTaskRunTemplate{
616-
PodTemplate: &pod.Template{
617-
Env: []v1.EnvVar{
618-
{
619-
Name: util.ControllerNamespace,
620-
Value: util.ControllerDeploymentName,
621-
},
622-
},
623-
},
624-
}
625614
if orasOptions != "" {
626-
pr.Spec.TaskRunTemplate.PodTemplate.Env = append([]v1.EnvVar{
627-
{
628-
Name: "ORAS_OPTIONS",
629-
Value: orasOptions,
615+
pr.Spec.TaskRunTemplate = tektonpipeline.PipelineTaskRunTemplate{
616+
PodTemplate: &pod.Template{
617+
Env: []v1.EnvVar{
618+
{
619+
Name: "ORAS_OPTIONS",
620+
Value: orasOptions,
621+
},
622+
},
630623
},
631-
}, pr.Spec.TaskRunTemplate.PodTemplate.Env...)
624+
}
632625
}
633626

634627
if jbsConfig.Annotations != nil && jbsConfig.Annotations[jbsconfig.CITests] == "true" {

0 commit comments

Comments
 (0)