Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use finalizer lock in EC build-definitions #1415

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/build/build_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,18 @@ var _ = framework.BuildSuiteDescribe("Build templates E2E test", Label("build",
pr, err := kubeadminClient.TektonController.RunPipeline(generator, testNamespace, int(ecPipelineRunTimeout.Seconds()))
Expect(err).NotTo(HaveOccurred())
defer func(pr *tektonpipeline.PipelineRun) {
err = kubeadminClient.TektonController.RemoveFinalizerFromPipelineRun(pr, constants.E2ETestFinalizerName)
if err != nil {
GinkgoWriter.Printf("error removing e2e test finalizer from %s : %v\n", pr.GetName(), err)
}
// Avoid blowing up PipelineRun usage
err := kubeadminClient.TektonController.DeletePipelineRun(pr.Name, pr.Namespace)
Expect(err).NotTo(HaveOccurred())
}(pr)

err = kubeadminClient.TektonController.AddFinalizerToPipelineRun(pr, constants.E2ETestFinalizerName)
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("error while adding finalizer %q to the pipelineRun %q", constants.E2ETestFinalizerName, pr.GetName()))

Expect(kubeadminClient.TektonController.WatchPipelineRun(pr.Name, testNamespace, int(ecPipelineRunTimeout.Seconds()))).To(Succeed())

// Refresh our copy of the PipelineRun for latest results
Expand Down
Loading