[
https://issues.jenkins-ci.org/browse/JENKINS-5891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=160132#comment-160132
]
Vlad Dovlekaev commented on JENKINS-5891:
-----------------------------------------
We have the same issue when copying the existing job using
http://HUDSON_SERVER/createItem?name=TargetJobName&mode=copy&from=SourceJobName
where SourceJobName has downstreamProject specified in its config.xml.
The created TargetJobName will not trigger the downstreamProject if running it
right after creating. Reloading the Jenkins configuration from disk resolves
the issue - but this is unacceptable for us definitely.
When getting the job information using
http://HUDSON_SERVER/view/All/job/TargetJobName/api/xml?depth=1 before
reloading, the <downstreamProject> section doesn't appear in the output XML.
While doing the same after reloading from disk - the <downstreamProject>
section "magically" appear and all works.
But once again - reloading the Jenkins configuration from disk every time the
new job is copied/created is definitely not an acceptable solution for us.
> Create job with downstream project by remote api doesn't work
> --------------------------------------------------------------
>
> Key: JENKINS-5891
> URL: https://issues.jenkins-ci.org/browse/JENKINS-5891
> Project: Jenkins
> Issue Type: Bug
> Components: core
> Affects Versions: current
> Environment: Ubuntu 8.10 + Tomcat
> hudson ver:1.343
> Reporter: jiliang
>
> I want to create a new job with remote api, so I post a config.xml to the
> create item url with parameter name=JOBNAME.
> command:wget --post-file=config.xml --header='Content-type: application/xml;
> charset=ISO-8859-1' http://HUDSON_SERVER/hudson/createItem?name=JOBNAME.
> All the job info had been written into config.xml.In the job, I specified
> a downstream project. That means I want this new job A trigger another job B
> after job A finished.
> After I created the job, I opened the job A page, and I can't find
> downstream project listed. In fact the job B exist before job A created, and
> job A does not trigger job B after it finished. But, If I open job A
> configure page and save it directly, the downstream project of job A will
> appear. Even I save a another job configure will trigger it appear. I think
> my config.xml file is right.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira