From 949ea3553f72e446b3b8532da32f12dc15134f07 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sat, 6 May 2017 03:15:47 +0200 Subject: [PATCH] re-enable when local clause --- .../frontend/yaml/compiler/compiler.go | 5 ++ .../pipeline/frontend/yaml/constraint.go | 2 + vendor/vendor.json | 48 +++++++++---------- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go index ab81bad1..a093f90c 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go +++ b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go @@ -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 } diff --git a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/constraint.go b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/constraint.go index d62c0f98..92fcc4da 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/constraint.go +++ b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/constraint.go @@ -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. diff --git a/vendor/vendor.json b/vendor/vendor.json index 213d9b16..aa4b3689 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -38,68 +38,68 @@ { "checksumSHA1": "W3AuK8ocqHwlUajGmQLFvnRhTZE=", "path": "github.com/cncd/pipeline/pipeline", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "Qu2FreqaMr8Yx2bW9O0cxAGgjr0=", "path": "github.com/cncd/pipeline/pipeline/backend", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "0CGXRaYwZhJxGIrGhn8WGpkFqPo=", "path": "github.com/cncd/pipeline/pipeline/backend/docker", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "NBMyXSWTkSz8fofoDD3WGIKICEw=", "path": "github.com/cncd/pipeline/pipeline/frontend", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { - "checksumSHA1": "QWs+L3emrt5DDTWvqD6rbMtLKMw=", + "checksumSHA1": "9opqXFEPe4aCzLgE7WWmcT0luyI=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { - "checksumSHA1": "ggOpR/vh0Hs6SnaiuiEO/9dUkcA=", + "checksumSHA1": "9v8iD2pXLuh5eV27+l9f5b7Zw4k=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/compiler", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "Q0GkNUFamVYIA1Fd8r0A5M6Gx54=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/linter", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "kx2sPUIMozPC/g6E4w48h3FfH3k=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/matrix", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "2/3f3oNmxXy5kcrRLCFa24Oc9O4=", "path": "github.com/cncd/pipeline/pipeline/interrupt", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "uOjTfke7Qxosrivgz/nVTHeIP5g=", "path": "github.com/cncd/pipeline/pipeline/multipart", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "vWImaniGEUutEvLvNCzTpSRSArg=", "path": "github.com/cncd/pipeline/pipeline/rpc", - "revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468", - "revisionTime": "2017-04-21T13:35:39Z" + "revision": "5cc866493ddb8e321050e061a926a9af0080d4de", + "revisionTime": "2017-05-06T00:17:19Z" }, { "checksumSHA1": "7Qj1DK0ceAXkYztW0l3+L6sn+V8=",