From 233fec9a18844789a21d3a13213ce74f0cd41e07 Mon Sep 17 00:00:00 2001 From: tphoney Date: Wed, 24 Feb 2021 16:48:02 +0000 Subject: [PATCH] (feat) adding depends_on, image and detached fields to step --- go.mod | 3 ++- go.sum | 1 + pipeline/runtime/runner.go | 3 +++ pipeline/runtime/type.go | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5584f39..d83bba5 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/buildkite/yaml v2.1.0+incompatible github.com/coreos/go-semver v0.3.0 github.com/docker/go-units v0.4.0 - github.com/drone/drone-go v1.5.0 + github.com/drone/drone-go v1.6.0 github.com/drone/envsubst v1.0.2 github.com/google/go-cmp v0.3.0 github.com/hashicorp/go-multierror v1.0.0 @@ -17,3 +17,4 @@ require ( golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 golang.org/x/sync v0.0.0-20190423024810-112230192c58 ) + diff --git a/go.sum b/go.sum index f2360c5..dbe4949 100644 --- a/go.sum +++ b/go.sum @@ -22,6 +22,7 @@ github.com/drone/drone-go v1.4.1-0.20201109202657-b9e58bbbcf27 h1:58xKlW/Kwp/Apz github.com/drone/drone-go v1.4.1-0.20201109202657-b9e58bbbcf27/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= github.com/drone/drone-go v1.5.0 h1:4rM74O3Xd6SnkdRIidlwwhVAPs4dXvcdVCgGvkrqL1M= github.com/drone/drone-go v1.5.0/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= +github.com/drone/drone-go v1.6.0/go.mod h1:fxCf9jAnXDZV1yDr0ckTuWd1intvcQwfJmTRpTZ1mXg= github.com/drone/envsubst v1.0.2 h1:dpYLMAspQHW0a8dZpLRKe9jCNvIGZPhCPrycZzIHdqo= github.com/drone/envsubst v1.0.2/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= diff --git a/pipeline/runtime/runner.go b/pipeline/runtime/runner.go index b9351fa..ea8da53 100644 --- a/pipeline/runtime/runner.go +++ b/pipeline/runtime/runner.go @@ -267,6 +267,9 @@ func (s *Runner) run(ctx context.Context, stage *drone.Stage, data *client.Conte StageID: stage.ID, Status: drone.StatusPending, ErrIgnore: src.GetErrPolicy() == ErrIgnore, + Image: src.GetImage(), + Detached: src.IsDetached(), + DependsOn: src.GetDependencies(), }) } diff --git a/pipeline/runtime/type.go b/pipeline/runtime/type.go index c517982..38fa4de 100644 --- a/pipeline/runtime/type.go +++ b/pipeline/runtime/type.go @@ -131,6 +131,9 @@ type ( // Clone returns a copy of the Step. Clone() Step + + // GetImage returns the image used in the step. + GetImage() string } // State reports the step state.