From e66bb6baceb48afaa71271c8a1ab8dfaaefb37c6 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 15 May 2015 19:41:22 -0700 Subject: [PATCH] enable trusted builds to do their thing --- cmd/drone-build/run.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/drone-build/run.go b/cmd/drone-build/run.go index 7158938f5..93a848c69 100644 --- a/cmd/drone-build/run.go +++ b/cmd/drone-build/run.go @@ -27,6 +27,13 @@ type Context struct { func setup(c *Context) error { var err error + var opts = parser.DefaultOpts + + // if repository is trusted the build may specify + // custom volumes, networking and run in trusted mode. + if c.Repo.Trusted { + opts = &parser.Opts{true, true, true} + } // inject the matrix parameters into the yaml injected := inject.Inject(string(c.Yaml), c.Build.Environment)