From 1f4e2e401eae40045f4d354163f36a9db3b9bc58 Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Fri, 21 Feb 2020 11:38:16 -0600 Subject: [PATCH] Override pipeline script class name --- .../com/widen/plugins/buildkite/BuildkitePlugin.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 276a587..4d90f18 100644 --- a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy +++ b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePlugin.groovy @@ -54,7 +54,11 @@ class BuildkitePlugin implements Plugin { extension.pipeline(pipelineName) { BuildkitePipeline pipeline -> // Avoid loading the file until the pipeline spec is actually requested. - def script = (PipelineScript) shell.parse(new GroovyCodeSource(file.text, file.path, file.path)) + def script = (PipelineScript) shell.parse(new GroovyCodeSource( + file.text, + "${pipelineName}Pipeline", // override class name to handle files with dashes + file.path + )) script.setProject(project) script.setBuildkite(extension) script.setPipeline(pipeline)