diff --git a/executor/linux/step.go b/executor/linux/step.go index 88186dbc..318f8141 100644 --- a/executor/linux/step.go +++ b/executor/linux/step.go @@ -12,6 +12,7 @@ import ( "time" "github.com/go-vela/sdk-go/vela" + api "github.com/go-vela/server/api/types" "github.com/go-vela/types/constants" "github.com/go-vela/types/library" "github.com/go-vela/types/pipeline" @@ -41,7 +42,7 @@ func (c *client) CreateStep(ctx context.Context, ctn *pipeline.Container) error // create a library step object to facilitate injecting environment as early as possible // (PlanStep is too late to inject environment vars for the kubernetes runtime). - _step := library.StepFromBuildContainer(c.build.ToLibrary(), ctn) + _step := api.StepFromBuildContainer(c.build, ctn) // update the step container environment // @@ -90,7 +91,7 @@ func (c *client) PlanStep(ctx context.Context, ctn *pipeline.Container) error { logger := c.Logger.WithField("step", ctn.Name) // create the library step object - _step := library.StepFromBuildContainer(c.build.ToLibrary(), ctn) + _step := api.StepFromBuildContainer(c.build, ctn) _step.SetStatus(constants.StatusRunning) _step.SetStarted(time.Now().UTC().Unix()) diff --git a/executor/local/step.go b/executor/local/step.go index 23ffb2ef..460abb06 100644 --- a/executor/local/step.go +++ b/executor/local/step.go @@ -8,6 +8,7 @@ import ( "fmt" "time" + api "github.com/go-vela/server/api/types" "github.com/go-vela/types/constants" "github.com/go-vela/types/library" "github.com/go-vela/types/pipeline" @@ -50,7 +51,7 @@ func (c *client) PlanStep(ctx context.Context, ctn *pipeline.Container) error { } // create the library step object - _step := library.StepFromBuildContainer(c.build.ToLibrary(), ctn) + _step := api.StepFromBuildContainer(c.build, ctn) _step.SetStatus(constants.StatusRunning) _step.SetStarted(time.Now().UTC().Unix()) diff --git a/go.mod b/go.mod index 0eb84b53..2f7c5f91 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/docker/docker v27.3.1+incompatible github.com/docker/go-units v0.5.0 github.com/gin-gonic/gin v1.10.0 - github.com/go-vela/sdk-go v0.25.1 - github.com/go-vela/server v0.25.1 + github.com/go-vela/sdk-go v0.25.0 + github.com/go-vela/server v0.25.1-0.20241004140454-248b3a3ecf4b github.com/go-vela/types v0.25.1 github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/go-cmp v0.6.0 @@ -149,3 +149,5 @@ require ( sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) + +replace github.com/go-vela/server => ../server diff --git a/go.sum b/go.sum index 72b7eb81..875ef0e0 100644 --- a/go.sum +++ b/go.sum @@ -109,10 +109,8 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27 github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/go-vela/sdk-go v0.25.1 h1:aEWH88BjLmV5s3mWPbi7OeGY5u8IQ9xQNF8CWH3e5HU= -github.com/go-vela/sdk-go v0.25.1/go.mod h1:98yxwcqGQidNke/QsbG8WeYJG56AImc9o9dcKiXBQ5k= -github.com/go-vela/server v0.25.1 h1:KM3g5ZD3N6SnttnkfOyJjS2utbL6baKx0mGSJLCEf0c= -github.com/go-vela/server v0.25.1/go.mod h1:QZ9troVMUpDCAdUxxAquHqahkeSwp9Lmx6a47ao0gGs= +github.com/go-vela/sdk-go v0.25.0 h1:a5vGXEmwb8e+p+aK9W4b111FhiTDDSfR4HmEZckhgBk= +github.com/go-vela/sdk-go v0.25.0/go.mod h1:UNXiPyDO8FGMinGgjw/LSS43Y8H+kyvxfAXIOSmEfB0= github.com/go-vela/types v0.25.1 h1:DCPHv1+ouqldjfsjfcVTcm/Yyd0OwazIfxYyR+GwpMo= github.com/go-vela/types v0.25.1/go.mod h1:5+MHUI9ZSY2Uz1cTJa64FWUv8jKzzUUq96UQTokGJzs= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=