Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkinsfile-runner fails with pipeline as yaml input #667

Open
natsen opened this issue Dec 4, 2022 · 1 comment
Open

Jenkinsfile-runner fails with pipeline as yaml input #667

natsen opened this issue Dec 4, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@natsen
Copy link

natsen commented Dec 4, 2022

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu

Reproduction steps

  1. docker run --rm -v $(pwd)/Jenkinsfile.yml:/workspace/Jenkinsfile.yml jenkins/jenkinsfile-runner
    Jenkinsfile.yml:
pipeline:
  agent:
    none:
  stages:
  - stage: "Print Hello"
    steps:
    - echo "Hello, YAML world!"

Expected Results

Hello, YAML World!

Actual Results

Started
Resume disabled by user, switching to high-performance, low-durability mode.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 5: expecting EOF, found ':' @ line 5, column 10.
- stage: "Print Hello"
^

1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)
    at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:349)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:225)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:191)
    at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:233)
    at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:189)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:966)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:626)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:323)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:293)
    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:677)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:689)
    at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
    at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
    at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:561)
    at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:513)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:335)
    at hudson.model.ResourceController.execute(ResourceController.java:101)
    at hudson.model.Executor.run(Executor.java:442)

Finished: FAILURE

Anything else?

This is reproducible with main branch as well. On debugging the issue

return ExtensionList.lookup(PipelineDefinitionProvider.class);
returns empty list instead of the two implementations it is supposed to return.

I reviewed jenkinsci/pipeline-as-yaml-plugin#28 but this issue happens even before SetJenkinsfileLocation.

@natsen natsen added the bug Something isn't working label Dec 4, 2022
@qwertyuiope
Copy link

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants