Fwd: Possible bug creating items

12 views
Skip to first unread message

David Quirós Pérez

unread,
Mar 6, 2018, 4:12:50 AM3/6/18
to jenkins...@googlegroups.com
Hello Jenkins Team,

I discovered the next issue when we updated from Jenkins 1.620 to Jenkins 2.89.4.

We were using a script to create job items doing a POST of a config.xml to our jenkins url like this:
http://our-site.com/job/Project/createItem?name={job_name}

This config.xml describe a quiet simple job triggered by BitBucket (git push) that execute a shell script. The job also has 4 post-build actions:
- Publish Cobertura Coverage Report
- Publish JUnit test result report
- Report Violations
- Notify Stash Instance

The script worked perfectly and created the jobs correctly, until we updated Jenkins.
When we create a job now with this method, the job is created (the http response from the POST is OK) and the configuration of the job is the expected except for the post-build actions. 
They were not visible on the configuration view of the job.
We check diferences on the config.xml files, we updated the template we used before to match the new jenkins version and plugin versions and the jobs are still being created without the 
post-build actions.
Only the Publish JUnit test result report is being created correctly. The funny part is that if we fetch the config.xml of the job created with our POST we can see the content defined for
the post-build actions that were not created.

Please, ask me for any info you need and sorry for my poor english.
Best regards,
David Q.

Baptiste Mathus

unread,
Mar 6, 2018, 4:30:47 PM3/6/18
to jenkins...@googlegroups.com
IMO, what would strongly help everyone including you, is that you narrow down the version with which the issue started. 

Also, you're doing a very big jump of 2.5 years and dozens of versions. You should probably try to upgrade in some bumps: to the closest LTS, and then from one to the next one, leveraging https://jenkins.io/doc/upgrade-guide/

HTH

--
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 jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABfmngtuKFfo5HaNuXvrxygNL3JB0tSN%2BPz2RJ91SvyooDTcwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Mark Waite

unread,
Mar 6, 2018, 4:58:35 PM3/6/18
to jenkins...@googlegroups.com
Another alternative is to use the new Jenkins version to define a job interactively with the post-build actions you want.  Compare the config.xml file from that job with the XML of the job you're trying to create.  You may identify important differences between the two.

Mark Waite

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5mOct6Etox4er_odrwY62JK4p4ssYr_mHkWazmHU0qsQ%40mail.gmail.com.

Björn Pedersen

unread,
Mar 7, 2018, 2:37:26 AM3/7/18
to Jenkins Users
Hi,

actually this seems like this is a job that is easily ported to modern  pipeline style. Maybe this now a good point to switch directly?
Then the xml would be quite generic...

Björn
Reply all
Reply to author
Forward
0 new messages