Skip to content

Commit

Permalink
Add also the BundlesSvc singleton service to the Finally class
Browse files Browse the repository at this point in the history
Signed-off-by: cmoulliard <cmoulliard@redhat.com>
  • Loading branch information
cmoulliard committed Aug 29, 2024
1 parent b315f66 commit ddc12a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/dev/snowdrop/factory/konflux/pipeline/Finally.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.snowdrop.factory.konflux.pipeline;

import dev.snowdrop.service.BundlesSvc;
import io.fabric8.tekton.pipeline.v1.ParamValue;
import io.fabric8.tekton.pipeline.v1.PipelineTask;
import io.fabric8.tekton.pipeline.v1.PipelineTaskBuilder;
Expand All @@ -12,14 +13,20 @@

public class Finally {

static BundlesSvc bundlesSvc;

static {
bundlesSvc = BundlesSvc.getInstance();
}

public static List<PipelineTask> KONFLUX_PIPELINE_FINALLY() {
List<PipelineTask> finallyTasks = new ArrayList<PipelineTask>();
finallyTasks.add(new PipelineTaskBuilder()
.withName("show-sbom")
.withNewTaskRef()
.withResolver("bundles")
.withParams()
.addNewParam().withName("bundle").withValue(new ParamValue(getBundleURL(KONFLUX_TEKTON_QUAY_CATALOG,"task-show-sbom","0.1"))).endParam()
.addNewParam().withName("bundle").withValue(new ParamValue(bundlesSvc.getBundleURL(KONFLUX_TEKTON_QUAY_CATALOG,"task-show-sbom","0.1"))).endParam()
.addNewParam().withName("name").withValue(new ParamValue("show-sbom")).endParam()
.addNewParam().withName("kind").withValue(new ParamValue("task")).endParam()
.endTaskRef()
Expand All @@ -32,7 +39,7 @@ public static List<PipelineTask> KONFLUX_PIPELINE_FINALLY() {
.withNewTaskRef()
.withResolver("bundles")
.withParams()
.addNewParam().withName("bundle").withValue(new ParamValue(getBundleURL(KONFLUX_TEKTON_QUAY_CATALOG,"task-summary","0.2"))).endParam()
.addNewParam().withName("bundle").withValue(new ParamValue(bundlesSvc.getBundleURL(KONFLUX_TEKTON_QUAY_CATALOG,"task-summary","0.2"))).endParam()
.addNewParam().withName("name").withValue(new ParamValue("summary")).endParam()
.addNewParam().withName("kind").withValue(new ParamValue("task")).endParam()
.endTaskRef()
Expand Down

0 comments on commit ddc12a2

Please sign in to comment.