Skip to content

Commit

Permalink
Attempt to fix problems with pipeline files with dashes
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind committed Feb 21, 2020
1 parent 49b63fa commit 2a087c9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ class BuildkitePlugin implements Plugin<Project> {
))

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

0 comments on commit 2a087c9

Please sign in to comment.