From 2a087c9f0a35108492a81f15b4d92428408ba38f Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Fri, 21 Feb 2020 11:22:35 -0600 Subject: [PATCH] Attempt to fix problems with pipeline files with dashes --- .../com/widen/plugins/buildkite/BuildkitePlugin.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy index 2cb3e85..276a587 100644 --- a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy +++ b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy @@ -50,9 +50,11 @@ class BuildkitePlugin implements Plugin { )) files.each { file -> - extension.pipeline(pipelineNameFromFile(file)) { BuildkitePipeline pipeline -> + def pipelineName = pipelineNameFromFile(file) + + extension.pipeline(pipelineName) { BuildkitePipeline pipeline -> // Avoid loading the file until the pipeline spec is actually requested. - def script = (PipelineScript) shell.parse(file) + def script = (PipelineScript) shell.parse(new GroovyCodeSource(file.text, file.path, file.path)) script.setProject(project) script.setBuildkite(extension) script.setPipeline(pipeline)