Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions deploy/tasks/maven-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ spec:
- name: MVN_USERNAME
description: Maven repository username
type: string
default: ""
- name: MVN_PASSWORD
description: Name of the secret holding the Maven repository password
type: string
- name: MVN_SERVER_ID
description: Server identification in Maven settings.
type: string
default: "indy-mvn"
- name: ACCESS_TOKEN
description: Access token for OAuth.
type: string
Expand Down Expand Up @@ -66,10 +71,6 @@ spec:
cpu: 10m
memory: 512Mi
env:
- name: MVN_REPO
value: $(params.MVN_REPO)
- name: MVN_USERNAME
value: $(params.MVN_USERNAME)
- name: MAVEN_PASSWORD
valueFrom:
secretKeyRef:
Expand All @@ -82,4 +83,5 @@ spec:
- --directory=/var/workdir/deployment
- --mvn-repo=$(params.MVN_REPO)
- --mvn-username=$(params.MVN_USERNAME)
- --mvn-settings=/var/workdir/settings.xml
- --server-id=$(params.MVN_SERVER_ID)
- --mvn-settings=/var/workdir/settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
throw new RuntimeException("Deploy failed");
}
if (isNotEmpty(mvnSettings)) {
if (!Path.of(mvnSettings).toFile().exists()) {
Log.errorf("Invalid Maven settings path: %s", mvnSettings);
throw new RuntimeException("Invalid Maven settings");

Check warning on line 54 in java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/deploy/DeployCommand.java

View check run for this annotation

Codecov / codecov/patch

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

Added lines #L53 - L54 were not covered by tests
}
System.setProperty("maven.settings", mvnSettings);
}
if (isNotEmpty(mvnRepo)) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/jvmbuildservice/v1alpha1/systemconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ const (
KonfluxGitDefinition = "https://raw.githubusercontent.com/konflux-ci/build-definitions/refs/heads/main/task/git-clone/0.1/git-clone.yaml"
KonfluxPreBuildDefinitions = "https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service/main/deploy/tasks/pre-build.yaml"
KonfluxBuildDefinitions = "https://raw.githubusercontent.com/konflux-ci/build-definitions/refs/heads/main/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml"
KonfluxMavenDeployDefinitions = "https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service/main/deploy/tasks/maven-deployment.yaml"
KonfluxMavenDeployDefinitions = "https://raw.githubusercontent.com/rnc/jvm-build-service/SETTINGSPATH/deploy/tasks/maven-deployment.yaml"
)
7 changes: 7 additions & 0 deletions pkg/reconciler/dependencybuild/buildrecipeyaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,13 @@ use-archive oci:$URL@$AARCHIVE=%s`, orasOptions, registryArgsWithDefaults(jbsCon
StringVal: v1alpha1.MavenSecretName,
},
},
{
Name: "MVN_SERVER_ID",
Value: tektonpipeline.ParamValue{
Type: tektonpipeline.ParamTypeString,
StringVal: "jbs-server",
},
},
{
Name: "JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE",
Value: tektonpipeline.ParamValue{
Expand Down
Loading