Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Doesn't work with unparameterized builds #1

Open
tylerbrandt opened this issue Jan 19, 2018 · 2 comments
Open

Doesn't work with unparameterized builds #1

tylerbrandt opened this issue Jan 19, 2018 · 2 comments

Comments

@tylerbrandt
Copy link

If the remote job doesn't have any parameters it rejects being run with /buildWithParameters:

jenkins__jenkins_

This results in logging like the following in the remote calling job:

JENKINS_URL: https://jenkins.pci-us-west-2.optimizely.net
JOB_NAME: clientbuildserver-promote-staging-tags
The whole list of values is 'token=[*******]'
PARAMS: token=[*******]
Calling REMOTE_JOB_URL: https://jenkins.pci-us-west-2.optimizely.net/job/clientbuildserver-promote-staging-tags/buildWithParameters?token=[*******]
No QUEUED_URL was found.  Did you remember to set a token (-t)?
Build step 'Execute shell' marked build as failure
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Finished: FAILURE

I had to add a dummy parameter to the job to make it work.

@NizarNi
Copy link

NizarNi commented Jan 15, 2019

Exactly, you have to remove the "/buildWithParameters" from REMOTE_JOB_URL if you want to proceed with jobs non-parameterized. See this for a better basic understanding: https://wiki.jenkins.io/display/JENKINS/Remote+access+API

@dFurman
Copy link

dFurman commented Nov 14, 2019

They explained in the script that only buildWithParameters is the way to get the job number url.
workaround you can use is to add a dummy parameter to your job.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants