@@ -45,10 +45,9 @@ func (c *client) SetupBuild(ctx context.Context, b *pipeline.Build) error {
4545
4646 if c .PipelinePodTemplate == nil {
4747 if len (c .config .PipelinePodsTemplateName ) > 0 {
48- // nolint: contextcheck // ignore non-inherited new context
49- podsTemplateResponse , err := c .VelaKubernetes .VelaV1alpha1 ().PipelinePodsTemplates (c .config .Namespace ).Get (
50- context .Background (), c .config .PipelinePodsTemplateName , metav1.GetOptions {},
51- )
48+ podsTemplateResponse , err := c .VelaKubernetes .VelaV1alpha1 ().
49+ PipelinePodsTemplates (c .config .Namespace ).
50+ Get (ctx , c .config .PipelinePodsTemplateName , metav1.GetOptions {})
5251 if err != nil {
5352 return err
5453 }
@@ -192,10 +191,9 @@ func (c *client) AssembleBuild(ctx context.Context, b *pipeline.Build) error {
192191 // send API call to create the pod
193192 //
194193 // https://pkg.go.dev/k8s.io/client-go/kubernetes/typed/core/v1?tab=doc#PodInterface
195- // nolint: contextcheck // ignore non-inherited new context
196194 _ , err = c .Kubernetes .CoreV1 ().
197195 Pods (c .config .Namespace ).
198- Create (context . Background () , c .Pod , metav1.CreateOptions {})
196+ Create (ctx , c .Pod , metav1.CreateOptions {})
199197 if err != nil {
200198 return err
201199 }
@@ -233,10 +231,9 @@ func (c *client) RemoveBuild(ctx context.Context, b *pipeline.Build) error {
233231
234232 c .Logger .Infof ("removing pod %s" , c .Pod .ObjectMeta .Name )
235233 // send API call to delete the pod
236- // nolint: contextcheck // ignore non-inherited new context
237234 err := c .Kubernetes .CoreV1 ().
238235 Pods (c .config .Namespace ).
239- Delete (context . Background () , c .Pod .ObjectMeta .Name , opts )
236+ Delete (ctx , c .Pod .ObjectMeta .Name , opts )
240237 if err != nil {
241238 return err
242239 }
0 commit comments