mirror of https://github.com/harness/drone.git
support legacy yaml conversion
parent
e2c3ffc765
commit
2730e336d2
|
@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
### Added
|
||||||
|
- support for legacy environment variables
|
||||||
|
- support for legacy workspace based on repository name
|
||||||
|
- support for github deployment hooks
|
||||||
|
- provide base sha for github pull requests
|
||||||
|
|
||||||
## [1.2.1] - 2019-06-11
|
## [1.2.1] - 2019-06-11
|
||||||
### Added
|
### Added
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -19,7 +19,7 @@ require (
|
||||||
github.com/drone/drone-go v1.0.5-0.20190427184118-618e4496482e
|
github.com/drone/drone-go v1.0.5-0.20190427184118-618e4496482e
|
||||||
github.com/drone/drone-runtime v1.0.6
|
github.com/drone/drone-runtime v1.0.6
|
||||||
github.com/drone/drone-ui v0.0.0-20190530175131-92ba3df1e0a9
|
github.com/drone/drone-ui v0.0.0-20190530175131-92ba3df1e0a9
|
||||||
github.com/drone/drone-yaml v1.2.1-0.20190717150947-d14ac477f983
|
github.com/drone/drone-yaml v1.2.2-0.20190719012529-c50000a465ee
|
||||||
github.com/drone/envsubst v1.0.1
|
github.com/drone/envsubst v1.0.1
|
||||||
github.com/drone/go-license v1.0.2
|
github.com/drone/go-license v1.0.2
|
||||||
github.com/drone/go-login v1.0.4-0.20190311170324-2a4df4f242a2
|
github.com/drone/go-login v1.0.4-0.20190311170324-2a4df4f242a2
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -87,6 +87,10 @@ github.com/drone/drone-yaml v1.1.4-0.20190614011118-4889634ea9ae h1:CzpY1F9Ju46g
|
||||||
github.com/drone/drone-yaml v1.1.4-0.20190614011118-4889634ea9ae/go.mod h1:l/ehbHx9TGs4jgzhRnP5d+M9tmRsAmWyBHWAFEOXrk4=
|
github.com/drone/drone-yaml v1.1.4-0.20190614011118-4889634ea9ae/go.mod h1:l/ehbHx9TGs4jgzhRnP5d+M9tmRsAmWyBHWAFEOXrk4=
|
||||||
github.com/drone/drone-yaml v1.2.1-0.20190717150947-d14ac477f983 h1:J59SqAC/DA1FuOXUvtGfYlhZSHegJL+AF9PnhXsxbKA=
|
github.com/drone/drone-yaml v1.2.1-0.20190717150947-d14ac477f983 h1:J59SqAC/DA1FuOXUvtGfYlhZSHegJL+AF9PnhXsxbKA=
|
||||||
github.com/drone/drone-yaml v1.2.1-0.20190717150947-d14ac477f983/go.mod h1:l/ehbHx9TGs4jgzhRnP5d+M9tmRsAmWyBHWAFEOXrk4=
|
github.com/drone/drone-yaml v1.2.1-0.20190717150947-d14ac477f983/go.mod h1:l/ehbHx9TGs4jgzhRnP5d+M9tmRsAmWyBHWAFEOXrk4=
|
||||||
|
github.com/drone/drone-yaml v1.2.2-0.20190719011530-e8b24d482cda h1:vPXJLgkyScZ0WnjzATIUcQbSRUjcP9BtnC+CMA1sSOk=
|
||||||
|
github.com/drone/drone-yaml v1.2.2-0.20190719011530-e8b24d482cda/go.mod h1:l/ehbHx9TGs4jgzhRnP5d+M9tmRsAmWyBHWAFEOXrk4=
|
||||||
|
github.com/drone/drone-yaml v1.2.2-0.20190719012529-c50000a465ee h1:/zyEkv56+T6JxLkYgYYwZAMLKBgEnHA3fwZXiVI9nuE=
|
||||||
|
github.com/drone/drone-yaml v1.2.2-0.20190719012529-c50000a465ee/go.mod h1:l/ehbHx9TGs4jgzhRnP5d+M9tmRsAmWyBHWAFEOXrk4=
|
||||||
github.com/drone/envsubst v1.0.1 h1:NOOStingM2sbBwsIUeQkKUz8ShwCUzmqMxWrpXItfPE=
|
github.com/drone/envsubst v1.0.1 h1:NOOStingM2sbBwsIUeQkKUz8ShwCUzmqMxWrpXItfPE=
|
||||||
github.com/drone/envsubst v1.0.1/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0=
|
github.com/drone/envsubst v1.0.1/go.mod h1:bkZbnc/2vh1M12Ecn7EYScpI4YGYU0etwLJICOWi8Z0=
|
||||||
github.com/drone/go-license v1.0.2 h1:7OwndfYk+Lp/cGHkxe4HUn/Ysrrw3WYH2pnd99yrkok=
|
github.com/drone/go-license v1.0.2 h1:7OwndfYk+Lp/cGHkxe4HUn/Ysrrw3WYH2pnd99yrkok=
|
||||||
|
|
|
@ -188,6 +188,7 @@ func (r *Runner) Run(ctx context.Context, id int64) error {
|
||||||
// the legacy yaml configuration file to the new format.
|
// the legacy yaml configuration file to the new format.
|
||||||
y, err := converter.ConvertString(string(m.Config.Data), converter.Metadata{
|
y, err := converter.ConvertString(string(m.Config.Data), converter.Metadata{
|
||||||
Filename: m.Repo.Config,
|
Filename: m.Repo.Config,
|
||||||
|
URL: m.Repo.Link,
|
||||||
Ref: m.Build.Ref,
|
Ref: m.Build.Ref,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -151,24 +151,27 @@ func (q *queue) signal(ctx context.Context) error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// the worker is platform-specific. check to ensure
|
if w.os != "" || w.arch != "" || w.variant != "" || w.kernel != "" {
|
||||||
// the queue item matches the worker platform.
|
// the worker is platform-specific. check to ensure
|
||||||
if w.os != item.OS {
|
// the queue item matches the worker platform.
|
||||||
continue
|
if w.os != item.OS {
|
||||||
}
|
continue
|
||||||
if w.arch != item.Arch {
|
}
|
||||||
continue
|
if w.arch != item.Arch {
|
||||||
}
|
continue
|
||||||
// if the pipeline defines a variant it must match
|
}
|
||||||
// the worker variant (e.g. arm6, arm7, etc).
|
// if the pipeline defines a variant it must match
|
||||||
if item.Variant != "" && item.Variant != w.variant {
|
// the worker variant (e.g. arm6, arm7, etc).
|
||||||
continue
|
if item.Variant != "" && item.Variant != w.variant {
|
||||||
}
|
continue
|
||||||
// if the pipeline defines a kernel version it must match
|
}
|
||||||
// the worker kernel version (e.g. 1709, 1803).
|
// if the pipeline defines a kernel version it must match
|
||||||
if item.Kernel != "" && item.Kernel != w.kernel {
|
// the worker kernel version (e.g. 1709, 1803).
|
||||||
continue
|
if item.Kernel != "" && item.Kernel != w.kernel {
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(item.Labels) > 0 || len(w.labels) > 0 {
|
if len(item.Labels) > 0 || len(w.labels) > 0 {
|
||||||
if !checkLabels(item.Labels, w.labels) {
|
if !checkLabels(item.Labels, w.labels) {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue