Skip to content

Commit

Permalink
fix(RHTAPBUGS-1012): update to v1 API (konflux-ci#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas authored Nov 26, 2023
1 parent 87419a1 commit 21889bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/redhat-appstudio/e2e-tests/pkg/utils"
"github.com/redhat-appstudio/e2e-tests/pkg/utils/tekton"
"github.com/redhat-appstudio/image-controller/pkg/quay"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
)

const (
Expand Down Expand Up @@ -382,7 +382,7 @@ func (ci CI) setRequiredEnvVars() error {
if tektonObj, err = tekton.ExtractTektonObjectFromBundle(defaultBundleRef, "pipeline", "java-builder"); err != nil {
return fmt.Errorf("failed to extract the Tekton Pipeline from bundle: %+v", err)
}
javaPipelineObj := tektonObj.(tektonapi.PipelineObject)
javaPipelineObj := tektonObj.(*tektonapi.Pipeline)

var currentS2iJavaTaskRef string
for _, t := range javaPipelineObj.PipelineSpec().Tasks {
Expand All @@ -406,11 +406,11 @@ func (ci CI) setRequiredEnvVars() error {
if tektonObj, err = tekton.ExtractTektonObjectFromBundle(currentS2iJavaTaskRef, "task", "s2i-java"); err != nil {
return fmt.Errorf("failed to extract the Tekton Task from bundle: %+v", err)
}
taskObj := tektonObj.(tektonapi.TaskObject)
taskObj := tektonObj.(*tektonapi.Task)

for i, s := range taskObj.TaskSpec().Steps {
for i, s := range taskObj.Spec.Steps {
if s.Name == "analyse-dependencies-java-sbom" {
taskObj.TaskSpec().Steps[i].Image = newReqprocessorImage
taskObj.Spec.Steps[i].Image = newReqprocessorImage
}
}

Expand Down

0 comments on commit 21889bd

Please sign in to comment.