@@ -137,7 +137,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
137
137
verifyBuiltArtifactsArgs := verifyParameters (jbsConfig , recipe )
138
138
deployArgs := []string {
139
139
"verify" ,
140
- "--path=$(workspaces.source.path)/artifacts" ,
140
+ "--path=$(workspaces.source.path)/verify- artifacts" ,
141
141
"--logs-path=$(workspaces.source.path)/logs" ,
142
142
"--task-run-name=$(context.taskRun.name)" ,
143
143
"--build-id=" + buildId ,
@@ -463,7 +463,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
463
463
}
464
464
465
465
// Note - its also possible to refer to a remote pipeline ref as well as a task.
466
- resolver := tektonpipeline.ResolverRef {
466
+ buildResolver := tektonpipeline.ResolverRef {
467
467
// We can use either a http or git resolver. Using http as avoids cloning an entire repository.
468
468
Resolver : "http" ,
469
469
Params : []tektonpipeline.Param {
@@ -483,7 +483,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
483
483
RunAfter : runAfter ,
484
484
TaskRef : & tektonpipeline.TaskRef {
485
485
// Can't specify name and resolver as they clash.
486
- ResolverRef : resolver ,
486
+ ResolverRef : buildResolver ,
487
487
},
488
488
Timeout : & v12.Duration {Duration : time .Hour * v1alpha1 .DefaultTimeout },
489
489
Params : []tektonpipeline.Param {
@@ -556,7 +556,7 @@ URL=%s
556
556
DIGEST=$(tasks.%s.results.IMAGE_DIGEST)
557
557
AARCHIVE=$(oras manifest fetch $ORAS_OPTIONS $URL@$DIGEST | jq --raw-output '.layers[0].digest')
558
558
echo "URL $URL DIGEST $DIGEST AARCHIVE $AARCHIVE"
559
- use-archive oci:$URL@$AARCHIVE=$(workspaces.source.path)/artifacts` , orasOptions , registryArgsWithDefaults (jbsConfig , "" ), BuildTaskName ),
559
+ use-archive oci:$URL@$AARCHIVE=$(workspaces.source.path)/verify- artifacts` , orasOptions , registryArgsWithDefaults (jbsConfig , "" ), BuildTaskName ),
560
560
},
561
561
{
562
562
Name : "verify-and-check-for-contaminates" ,
@@ -586,11 +586,80 @@ use-archive oci:$URL@$AARCHIVE=$(workspaces.source.path)/artifacts`, orasOptions
586
586
},
587
587
}}
588
588
ps .Tasks = append (pipelineTask , ps .Tasks ... )
589
-
590
589
for _ , i := range postBuildTask .Results {
591
590
ps .Results = append (ps .Results , tektonpipeline.PipelineResult {Name : i .Name , Description : i .Description , Value : tektonpipeline.ResultValue {Type : tektonpipeline .ParamTypeString , StringVal : "$(tasks." + PostBuildTaskName + ".results." + i .Name + ")" }})
592
591
}
593
592
593
+ deployResolver := tektonpipeline.ResolverRef {
594
+ // We can use either a http or git resolver. Using http as avoids cloning an entire repository.
595
+ Resolver : "http" ,
596
+ Params : []tektonpipeline.Param {
597
+ {
598
+ Name : "url" ,
599
+ Value : tektonpipeline.ParamValue {
600
+ Type : tektonpipeline .ParamTypeString ,
601
+ StringVal : v1alpha1 .KonfluxMavenDeployDefinitions ,
602
+ },
603
+ },
604
+ },
605
+ }
606
+ ps .Tasks = append ([]tektonpipeline.PipelineTask {
607
+ {
608
+ Name : DeployTaskName ,
609
+ RunAfter : append (runAfterBuild , PostBuildTaskName ),
610
+ Workspaces : []tektonpipeline.WorkspacePipelineTaskBinding {
611
+ {Name : WorkspaceSource , Workspace : WorkspaceSource },
612
+ },
613
+ TaskRef : & tektonpipeline.TaskRef {
614
+ // Can't specify name and resolver as they clash.
615
+ ResolverRef : deployResolver ,
616
+ },
617
+ Params : []tektonpipeline.Param {
618
+ {
619
+ Name : PipelineResultImage ,
620
+ Value : tektonpipeline.ParamValue {
621
+ Type : tektonpipeline .ParamTypeString ,
622
+ StringVal : "$(tasks." + BuildTaskName + ".results." + PipelineResultImage + ")" ,
623
+ },
624
+ },
625
+ {
626
+ Name : PipelineResultImageDigest ,
627
+ Value : tektonpipeline.ParamValue {
628
+ Type : tektonpipeline .ParamTypeString ,
629
+ StringVal : "$(tasks." + BuildTaskName + ".results." + PipelineResultImageDigest + ")" ,
630
+ },
631
+ },
632
+ {
633
+ Name : "MVN_REPO" ,
634
+ Value : tektonpipeline.ParamValue {
635
+ Type : tektonpipeline .ParamTypeString ,
636
+ StringVal : jbsConfig .Spec .MavenDeployment .Repository ,
637
+ },
638
+ },
639
+ {
640
+ Name : "MVN_USERNAME" ,
641
+ Value : tektonpipeline.ParamValue {
642
+ Type : tektonpipeline .ParamTypeString ,
643
+ StringVal : jbsConfig .Spec .MavenDeployment .Username ,
644
+ },
645
+ },
646
+ {
647
+ Name : "MVN_PASSWORD" ,
648
+ Value : tektonpipeline.ParamValue {
649
+ Type : tektonpipeline .ParamTypeString ,
650
+ StringVal : v1alpha1 .MavenSecretName ,
651
+ },
652
+ },
653
+ {
654
+ Name : "JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE" ,
655
+ Value : tektonpipeline.ParamValue {
656
+ Type : tektonpipeline .ParamTypeString ,
657
+ StringVal : buildRequestProcessorImage ,
658
+ },
659
+ },
660
+ },
661
+ }}, ps .Tasks ... )
662
+
594
663
for _ , i := range pipelineParams {
595
664
ps .Params = append (ps .Params , tektonpipeline.ParamSpec {Name : i .Name , Description : i .Description , Default : i .Default , Type : i .Type })
596
665
var value tektonpipeline.ResultValue
0 commit comments