re-enable when local clause

This commit is contained in:
Brad Rydzewski
2017-05-06 03:15:47 +02:00
parent daffcf6f40
commit 949ea3553f
3 changed files with 31 additions and 24 deletions
@@ -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
View File
@@ -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.