Fwd: Possible bug creating items

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Possible bug creating items

David Quirós Pérez
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.

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug creating items

Baptiste MATHUS
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

2018-03-06 9:54 GMT+01:00 David Quirós Pérez <[hidden email]>:
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.

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5mOct6Etox4er_odrwY62JK4p4ssYr_mHkWazmHU0qsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug creating items

Mark Waite-2
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

On Tue, Mar 6, 2018 at 2:30 PM Baptiste Mathus <[hidden email]> wrote:
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

2018-03-06 9:54 GMT+01:00 David Quirós Pérez <[hidden email]>:
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.

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5mOct6Etox4er_odrwY62JK4p4ssYr_mHkWazmHU0qsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFjfUr%2BC50-kcBxLR563%2B6K5Ukg1hX1kNkeuZBvyVmEKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug creating items

Björn Pedersen
In reply to this post by David Quirós Pérez
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

Am Dienstag, 6. März 2018 10:12:50 UTC+1 schrieb David Quirós Pérez:
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:
<a href="http://our-site.com/job/Project/createItem?name=%7Bjob_name%7D" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Four-site.com%2Fjob%2FProject%2FcreateItem%3Fname%3D%257Bjob_name%257D\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGgSKaQqTvkH7ekexlD7tFlvVZiPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Four-site.com%2Fjob%2FProject%2FcreateItem%3Fname%3D%257Bjob_name%257D\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGgSKaQqTvkH7ekexlD7tFlvVZiPQ&#39;;return true;">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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e4bd9b81-1555-45ee-a1c1-4ea4c4a68e2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.