- Builds are not triggered through curl command and I receive an unauthentication message
- Builds are not triggered and the job is inside a folder
- CloudBees Jenkins Enterprise
- Build Token Root Plugin
Builds are not triggered through curl command and I receive an unauthentication message
This issue usually happen because you didn’t use the escape character ""
For normal builds use:
curl -X POST http://<JENKINS_URL>/buildByToken/build?job=MY_JOB\&token=MY_TOKEN
For builds with parameters you need to use the structure below where Type is the paramter:
curl -X POST http://<JENKINS_URL>/buildByToken/buildWithParameters/build?job=MY_JOB\&token=MY_TOKEN\&Type=Mexican
Changing the logging level to FINE helped identify the root cause.
Builds are not triggered and the job is inside a folder
As a job name you need to specify the Full Project Name you can get from Jenkins GUI.
So for exampe for the Job below which has as a token
The right command to trigger the job is:
curl -X POST https://felix.ci.cloudbees.com/buildByToken/build?job=myfolder/build-token-root-plugin-inside-folder\&token=mytoken