From f49042092eed89e3ed05d9fe47795c412100e468 Mon Sep 17 00:00:00 2001 From: claire1618 <55173466+claire1618@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:14:04 -0500 Subject: [PATCH] Update exec.go --- cmd/vela-worker/exec.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/vela-worker/exec.go b/cmd/vela-worker/exec.go index 81dce4f6..4c0da95b 100644 --- a/cmd/vela-worker/exec.go +++ b/cmd/vela-worker/exec.go @@ -62,13 +62,15 @@ func (w *Worker) exec(index int, config *library.Worker) error { return err } + // set up build executable execBuildExecutable, resp, err := execBuildClient.Build.GetBuildExecutable(item.Repo.GetOrg(), item.Repo.GetName(), item.Build.GetNumber()) if err != nil { return err } - var execBuildExecutablePipeline pipeline.Build - err = json.Unmarshal([]byte(execBuildExecutable.GetData()), &execBuildExecutablePipeline) + // get the build pipeline from the build executable + pipeline := new(pipeline.Build) + err = json.Unmarshal((execBuildExecutable.GetData()), pipeline) if err != nil { return err } @@ -162,7 +164,7 @@ func (w *Worker) exec(index int, config *library.Worker) error { Hostname: w.Config.API.Address.Hostname(), Runtime: w.Runtime, Build: item.Build, - Pipeline: &execBuildExecutablePipeline, + Pipeline: pipeline.Sanitize(w.Config.Runtime.Driver), Repo: item.Repo, User: item.User, Version: v.Semantic(),