Skip to content

Commit b445a35

Browse files
committed
Pass maven settings through
1 parent b674871 commit b445a35

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

deploy/tasks/maven-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,4 @@ spec:
7676
- --directory=/var/workdir/deployment
7777
- --mvn-repo=$(params.MVN_REPO)
7878
- --mvn-username=$(params.MVN_USERNAME)
79+
- --mvn-settings=/var/workdir/settings.xml

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public class DeployCommand implements Runnable {
2828
@ConfigProperty(name = "maven.password")
2929
Optional<String> mvnPassword;
3030

31+
@CommandLine.Option(names = "--mvn-settings")
32+
String mvnSettings;
33+
3134
@CommandLine.Option(names = "--mvn-repo")
3235
String mvnRepo;
3336

@@ -45,6 +48,9 @@ public void run() {
4548
Log.warnf("No deployed artifacts found. Has the build been correctly configured to deploy?");
4649
throw new RuntimeException("Deploy failed");
4750
}
51+
if (isNotEmpty(mvnSettings)) {
52+
System.setProperty("maven.settings", mvnSettings);
53+
}
4854
if (isNotEmpty(mvnRepo)) {
4955
// Maven Repo Deployment
5056
MavenRepositoryDeployer deployer = new MavenRepositoryDeployer(mvnCtx, mvnUser, mvnPassword.orElse(""), mvnRepo, serverId, deploymentPath);

pkg/apis/jvmbuildservice/v1alpha1/systemconfig_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type SystemConfigList struct {
4747

4848
const (
4949
KonfluxGitDefinition = "https://raw.githubusercontent.com/konflux-ci/build-definitions/refs/heads/main/task/git-clone/0.1/git-clone.yaml"
50-
KonfluxPreBuildDefinitions = "https://raw.githubusercontent.com/rnc/jvm-build-service/PIPELINE/deploy/tasks/pre-build.yaml"
50+
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/rnc/jvm-build-service/PIPELINE/deploy/tasks/maven-deployment.yaml"
52+
KonfluxMavenDeployDefinitions = "https://raw.githubusercontent.com/rnc/jvm-build-service/MVNSETTINGS/deploy/tasks/maven-deployment.yaml"
5353
)

0 commit comments

Comments
 (0)