Skip to content

Commit

Permalink
Override pipeline script class name
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Feb 21, 2020
1 parent 2a087c9 commit 1f4e2e4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ class BuildkitePlugin implements Plugin<Project> {

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)
Expand Down

0 comments on commit 1f4e2e4

Please sign in to comment.