Skip to content

Commit ff393eb

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

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
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: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"github.com/google/uuid"
88
"github.com/redhat-appstudio/jvm-build-service/pkg/reconciler/jbsconfig"
9-
"github.com/tektoncd/pipeline/pkg/apis/pipeline/pod"
109
"k8s.io/client-go/kubernetes"
1110
"k8s.io/utils/strings/slices"
1211
"sort"
@@ -611,17 +610,6 @@ func (r *ReconcileDependencyBuild) handleStateBuilding(ctx context.Context, db *
611610
},
612611
}},
613612
}
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-
}
625613
if orasOptions != "" {
626614
pr.Spec.TaskRunTemplate.PodTemplate.Env = append([]v1.EnvVar{
627615
{

0 commit comments

Comments
 (0)