Skip to content

edit and build fails with 400 error #667

@natsen

Description

@natsen

Describe the bug
jcli job edit -b "mutibranch-job branch" -f mypipeline.groovy fails with 400 error.
To Reproduce
Steps to reproduce the behavior:

  1. Create a multibranch job that sources jenkinsfile from scm
  2. Run the job
  3. edit and run the job jcli job edit -b "mutibranch-job branch" -f mypipeline.groovy
  4. Returns 400 error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
{"level":"debug","message":"HTTP request as curl","cmd":"curl -X 'POST' -H 'Authorization: Basic ==' -H 'Jenkins-Crumb: ' -H 'User-Agent: jcli; 0.0.38; a99158f' 'http://jenkins/build'"}
{"level":"debug","message":"get response","data":"\n\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>\n<title>Error 400 Nothing is submitted</title>\n\n

HTTP ERROR 400 Nothing is submitted

\n\n\n\n\n\n
URI:/jenkins//build
STATUS:400
MESSAGE:Nothing is submitted
SERVLET:Stapler
\n
<a href="https://eclipse.org/jetty\">Powered by Jetty:// 9.4.39.v20210325
\n\n\n\n"}
Error: bad request, code 400

Desktop (please complete the following information):

  • OS: [e.g. windows] Linux
  • Command Tool [e.g. cmd] jcli
  • Version [e.g. v0.0.16] Version: 0.0.38
    Last Commit: a99158f
    Build Date: 2021-09-22T01:54:03Z

Additional context
This might be happening only for the parameterized job. job edit with -b option did not ask for parameters. debug log shows it attempted to build the job (without parameters)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions