On Thu, 9 Mar 2017, at 18:18, Substance586 wrote:
> I'm trying to trigger a Jenkins job from my local CLI and, while it
> worked
> yesterday, today I can't get past "javax.servlet.ServletException: This
> page expects a form submission but had only
> {token=[Ljava.lang.String;@xxxx} exceptions. Here is my CLI command:
>
> curl -v -X POST http://<server>/jenkins/job/<jobName>/build?token=12345
>
> I've seen numerous ways to trigger builds remotely and the way that I've
> chosen is to set the token above in the destination job's "Trigger builds
> remotely" section and use the preceding curl command. I'm open to better
> ways to accomplish this.
>
> Stack Trace:
> * Connected to <server> (10.34.184.89) port 80 (#0)
> > POST /<jobName>/build?token=12345 HTTP/1.1
> > Host: <server>
> > User-Agent: curl/7.43.0
> > Accept: */*
Your curl command says /jenkins/job/<jobName>, but your curl output has
only /<jobName> as the path prefix?
You also don't need to use POST for this endpoint.
Using the CLI is a good way to start a build, and doesn't require a
token:
https://jenkins.io/doc/book/managing/cli/#build
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/1489201854.4093659.907667952.0C398082%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.