Skip to content

Commit cc0079f

Browse files
authored
Merge branch 'main' into domain-proxy
2 parents 0e9e08f + 70a533a commit cc0079f

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

deploy/tasks/maven-deployment.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ spec:
2525
- name: MVN_USERNAME
2626
description: Maven repository username
2727
type: string
28+
default: ""
2829
- name: MVN_PASSWORD
2930
description: Name of the secret holding the Maven repository password
3031
type: string
32+
- name: MVN_SERVER_ID
33+
description: Server identification in Maven settings.
34+
type: string
35+
default: "indy-mvn"
3136
- name: ACCESS_TOKEN
3237
description: Access token for OAuth.
3338
type: string
@@ -66,10 +71,6 @@ spec:
6671
cpu: 10m
6772
memory: 512Mi
6873
env:
69-
- name: MVN_REPO
70-
value: $(params.MVN_REPO)
71-
- name: MVN_USERNAME
72-
value: $(params.MVN_USERNAME)
7374
- name: MAVEN_PASSWORD
7475
valueFrom:
7576
secretKeyRef:
@@ -82,4 +83,5 @@ spec:
8283
- --directory=/var/workdir/deployment
8384
- --mvn-repo=$(params.MVN_REPO)
8485
- --mvn-username=$(params.MVN_USERNAME)
85-
- --mvn-settings=/var/workdir/settings.xml
86+
- --server-id=$(params.MVN_SERVER_ID)
87+
- --mvn-settings=/var/workdir/settings/settings.xml

java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/deploy/DeployCommand.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public void run() {
4949
throw new RuntimeException("Deploy failed");
5050
}
5151
if (isNotEmpty(mvnSettings)) {
52+
if (!Path.of(mvnSettings).toFile().exists()) {
53+
Log.errorf("Invalid Maven settings path: %s", mvnSettings);
54+
throw new RuntimeException("Invalid Maven settings");
55+
}
5256
System.setProperty("maven.settings", mvnSettings);
5357
}
5458
if (isNotEmpty(mvnRepo)) {

pkg/reconciler/dependencybuild/buildrecipeyaml.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,13 @@ use-archive oci:$URL@$AARCHIVE=%s`, orasOptions, registryArgsWithDefaults(jbsCon
715715
StringVal: v1alpha1.MavenSecretName,
716716
},
717717
},
718+
{
719+
Name: "MVN_SERVER_ID",
720+
Value: tektonpipeline.ParamValue{
721+
Type: tektonpipeline.ParamTypeString,
722+
StringVal: "jbs-server",
723+
},
724+
},
718725
{
719726
Name: "JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE",
720727
Value: tektonpipeline.ParamValue{

0 commit comments

Comments
 (0)