github.com/redhat-appstudio/e2e-tests@v0.0.0-20240520140907-9709f6f59323/pkg/clients/tekton/cosign_results.go (about) 1 package tekton 2 3 import ( 4 "context" 5 "time" 6 7 "k8s.io/apimachinery/pkg/util/wait" 8 9 g "github.com/onsi/ginkgo/v2" 10 "github.com/redhat-appstudio/e2e-tests/pkg/utils/tekton" 11 ) 12 13 // AwaitAttestationAndSignature awaits attestation and signature. 14 func (t *TektonController) AwaitAttestationAndSignature(image string, timeout time.Duration) error { 15 return wait.PollUntilContextTimeout(context.Background(), time.Second, timeout, true, func(ctx context.Context) (done bool, err error) { 16 if _, err := tekton.FindCosignResultsForImage(image); err != nil { 17 g.GinkgoWriter.Printf("failed to get cosign result for image %s: %+v\n", image, err) 18 return false, nil 19 } 20 21 return true, nil 22 }) 23 }