mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
re-enable when local clause
This commit is contained in:
+5
@@ -136,6 +136,11 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config {
|
||||
var stage *backend.Stage
|
||||
var group string
|
||||
for i, container := range conf.Pipeline.Containers {
|
||||
//Skip if local and should not run local
|
||||
if c.local && !container.Constraints.Local.Bool() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !container.Constraints.Match(c.metadata) {
|
||||
continue
|
||||
}
|
||||
|
||||
+2
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/cncd/pipeline/pipeline/frontend"
|
||||
libcompose "github.com/docker/libcompose/yaml"
|
||||
"github.com/cncd/pipeline/pipeline/frontend/yaml/types"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -18,6 +19,7 @@ type (
|
||||
Branch Constraint
|
||||
Status Constraint
|
||||
Matrix ConstraintMap
|
||||
Local types.BoolTrue
|
||||
}
|
||||
|
||||
// Constraint defines a runtime constraint.
|
||||
|
||||
Reference in New Issue
Block a user