Skip to content

Commit 768f0e2

Browse files
committed
Set recipeImage
1 parent b7ed468 commit 768f0e2

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

deploy/pipeline/mw-pipeline-v0.1.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spec:
1818
type: string
1919
default: |
2020
date
21+
- name: RECIPE_IMAGE
22+
type: string
2123
- name: BUILD_TOOL
2224
type: string
2325
- name: BUILD_TOOL_VERSION
@@ -56,9 +58,6 @@ spec:
5658
value: $(params.REVISION)
5759
- name: verbose
5860
value: 'true'
59-
# TODO: Unclear why this was added ; causes knock-on effects that the directory layout is then wrong.
60-
# - name: subdirectory
61-
# value: ''
6261
taskRef:
6362
resolver: bundles
6463
params:
@@ -84,7 +83,7 @@ spec:
8483
- name: NAME
8584
value: $(context.pipelineRun.name)
8685
- name: RECIPE_IMAGE
87-
value: "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service-builder-images/ubi8:latest"
86+
value: $(params.RECIPE_IMAGE)
8887
- name: BUILD_TOOL
8988
value: $(params.BUILD_TOOL)
9089
- name: BUILD_TOOL_VERSION

java-components/cli/src/main/java/com/redhat/hacbs/cli/driver/Base.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public abstract class Base {
3434
@CommandLine.Option(names = "--dependencies", description = "Dependencies URL", required = true)
3535
String dependencies;
3636

37+
@CommandLine.Option(names = "-i", description = "Recipe Image", defaultValue = "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service-builder-images/ubi8:latest")
38+
String recipeImage;
39+
3740
@ConfigProperty(name = "access.token")
3841
Optional<String> accessToken;
3942

java-components/cli/src/main/java/com/redhat/hacbs/cli/driver/Pipeline.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public void run() {
4141
.repositoryDeployUrl(deploy)
4242
.repositoryDependencyUrl(dependencies)
4343
.repositoryBuildContentId("test-maven-konflux-int-0001")
44+
.recipeImage(recipeImage)
4445
.build();
4546
try {
4647
driver.create(request);

java-components/driver/src/main/java/com/redhat/hacbs/driver/Driver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public void create(BuildRequest buildRequest) throws IOException {
6666
templateProperties.put("QUAY_REPO", quayRepo);
6767
templateProperties.put("URL", buildRequest.getScmUrl());
6868
templateProperties.put("REVISION", buildRequest.getScmRevision());
69+
templateProperties.put("RECIPE_IMAGE", buildRequest.getRecipeImage());
6970
templateProperties.put("BUILD_TOOL", buildRequest.getBuildTool());
7071
templateProperties.put("BUILD_TOOL_VERSION", buildRequest.getBuildToolVersion());
7172
templateProperties.put("JAVA_VERSION", buildRequest.getJavaVersion());

java-components/driver/src/main/java/com/redhat/hacbs/driver/dto/BuildRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@JsonIgnoreProperties(ignoreUnknown = true)
1515
public class BuildRequest {
1616

17+
private final String recipeImage;
1718
private final String buildTool;
1819
private final String buildToolVersion;
1920
private final String javaVersion;

java-components/driver/src/main/resources/pipeline.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
value: "%{URL}"
3434
- name: REVISION
3535
value: "%{REVISION}"
36+
- name: RECIPE_IMAGE
37+
value: "%{RECIPE_IMAGE}"
3638
- name: BUILD_TOOL
3739
value: "%{BUILD_TOOL}"
3840
- name: BUILD_TOOL_VERSION

0 commit comments

Comments
 (0)