Jump to content

Issue: webtrigger with question mark in URL (Jenkins)


Recommended Posts

Hi,

I try to add an `after-checkin` trigger to start a build on a Jenkins server. The issue looks like that my URL contains a question mark, to put additionnal parameters (the build token).

Here is the full command line I use on Windows powershell (doesn't work):

cm trigger create after-checkin CiNotifierWebTrigger "webtrigger http://<raw ipv4>:8080/job/TestBuild/build?token=<jenkins_build_token>" --server=<my_cloud_server>@cloud --filter="br:/Development,rep:<my_rep_name>"

This command doesn't create the trigger, and displays the usage help for cm trigger create (no error)

If I remove the character ?, the trigger is successfully registered, but the url is not what I need.
I tryied to use %3F instead of the question mark, but it didn't trigger on checkin. Tryied also to escape the question mark with `, but it also displays the usage help for cm trigger create.
I'm out of idea on this...

Link to comment
Share on other sites

I also tryied to use variables like so:

$TRIGGER_URL="webtrigger http://<raw_ipv4>:8080/buildByToken/build?job=<job_name>&token=SECRET"
cm trigger create after-checkin CiNotifierWebTrigger $TRIGGER_URL --server=<my_server>@cloud --filter="br:/Development,rep:<my_repo>"

But it has the same issue, as long as there is a question mark (?) in the url, the CLI shows the help instead add the trigger as I want (or an error)...
Without the question mark, the CLI successfully add the webtrigger.
Is it a bug in the CLI?

Link to comment
Share on other sites

Hi,

We are aware of this limitation and we already developed a fix for it, which should be available in the next week release:

Quote

[Bug]
Command-line client: Triggers should allow arguments with question marks

Sorry for the inconveniences, I will keep you updated on the release.
 
Regards,
 
Rafael
Unity Plastic SCM Support
Virtualize your Workspace. Make it dynamic.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...