So I noticed an strange but annoying bug when trying to update jobs from the virtual machine.
When executing the same command on the VM and the PM, it produces 2 different outcomes:
1. The output below comes from executing jenkins-job-builder on the VM:
vm_user$ jenkins-jobs --conf ./jenkins_jobs.ini delete job_name
INFO:root:Deleting jobs in [job_name]
INFO:jenkins_jobs.builder:Deleting jenkins job job_name
vm_user$ jenkins-jobs --conf ./jenkins_jobs.ini update ./
INFO:root:Updating jobs in ./ ([])
As you can see in the command above, no changes were applied although I just deleted the job
2. Now the second output below comes from executing jenkins-job-builder on the PM:
pm_user$ jenkins-jobs --conf ./jenkins_jobs.ini delete job_name
INFO:root:Deleting jobs in [job_name]
INFO:jenkins_jobs.builder:Deleting jenkins job job_name
pm_user$ jenkins-jobs --conf ./jenkins_jobs.ini update ./
INFO:root:Updating jobs in ./ ([])
INFO:jenkins_jobs.builder:Creating jenkins job job_name
And here, we can see that the job has been re-created as expected.
-----
I tried the following in order to debug what was going wrong:
- Reverting back to a version of the templates I am SURE worked (tested and committed months ago).
- Making sure the config had the right values (i.e.: password and cached ignored)
- Deleting the cache manually on the VM where Jenkins is being hosted on (also where the bug is occurring)
- Launching the job from a Jenkins' job with the same config and commands.
In all of the above I was able to reproduce the bug.
Then the last option I had was to check the version of jenkins-job-builder (which was hard to find**) on both machine and the VM had 0.8.0 while the other had 0.7.0.
Reverting back the version on the VM from 0.8.0 to 0.7.0 worked and the bug did not occur anymore!
In other words, the bug happens only on the version 0.8.0, so would you please look into it?
If you need more information, let me know.
** Would it be possible to add a `--version` or `-v` command to get the version?
Hi There,
Specs:
- Mac OSX 10.9.2 (Virtual Machine = VM)
- jenkins-job-builder v0.8.0 (downloaded with brew)
- Jenkins CI version 1.574
- Python 2.7
- Mac OSX 10.9.4 (Physical Machine = PM)
- jenkins-job-builder v0.7.0
- Python 2.7
So I noticed an strange but annoying bug when trying to update jobs from the virtual machine.
When executing the same command on the VM and the PM, it produces 2 different outcomes:
1. The output below comes from executing jenkins-job-builder on the VM:
vm_user$ jenkins-jobs --conf ./jenkins_jobs.ini delete job_name root:Deleting jobs in [job_name] jenkins_ jobs.builder: Deleting jenkins job job_name root:Updating jobs in ./ ([])
INFO:
INFO:
vm_user$ jenkins-jobs --conf ./jenkins_jobs.ini update ./
INFO:
As you can see in the command above, no changes were applied although I just deleted the job
2. Now the second output below comes from executing jenkins-job-builder on the PM:
pm_user$ jenkins-jobs --conf ./jenkins_jobs.ini delete job_name root:Deleting jobs in [job_name] jenkins_ jobs.builder: Deleting jenkins job job_name root:Updating jobs in ./ ([]) jenkins_ jobs.builder: Creating jenkins job job_name
INFO:
INFO:
pm_user$ jenkins-jobs --conf ./jenkins_jobs.ini update ./
INFO:
INFO:
And here, we can see that the job has been re-created as expected.
-----
I tried the following in order to debug what was going wrong:
- Reverting back to a version of the templates I am SURE worked (tested and committed months ago).
- Making sure the config had the right values (i.e.: password and cached ignored)
- Deleting the cache manually on the VM where Jenkins is being hosted on (also where the bug is occurring)
- Launching the job from a Jenkins' job with the same config and commands.
In all of the above I was able to reproduce the bug.
Then the last option I had was to check the version of jenkins-job-builder (which was hard to find**) on both machine and the VM had 0.8.0 while the other had 0.7.0.
Reverting back the version on the VM from 0.8.0 to 0.7.0 worked and the bug did not occur anymore!
In other words, the bug happens only on the version 0.8.0, so would you please look into it?
If you need more information, let me know.
** Would it be possible to add a `--version` or `-v` command to get the version?