jenkins-job-builder doesn't filter when using template

Bug #1260649 reported by Emily Bache
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
In Progress
Undecided
Unassigned

Bug Description

I have a folder 'input' with two files in - emily.yaml and foo.yaml. I can generate a jenkins config for just the emily file without difficulty:

 jenkins-jobs --conf ~/devtools/jenkins-job-builder/etc/jenkins_jobs.ini-sample -l debug update input emily

It correctly skips foo. If I add template.yaml and change foo.yaml and emily.yaml to both use that template, and run the same command, it doesn't skip foo any more. I think it should. There could be an error in foo.yaml that I don't want to deal with right now. I do however want to get a new xml for emily.

Output when it works correctly:

$ jenkins-jobs --conf ~/devtools/jenkins-job-builder/etc/jenkins_jobs.ini-sample -l debug update input emily
DEBUG:root:Reading config from ~/devtools/jenkins-job-builder/etc/jenkins_jobs.ini-sample
DEBUG:root:Config: <ConfigParser.ConfigParser instance at 0x1400ea8>
INFO:root:Updating jobs in input (['emily'])
DEBUG:jenkins_jobs.builder:Parsing YAML file input/foo.yaml
DEBUG:jenkins_jobs.builder:Parsing YAML file input/emily.yaml
DEBUG:jenkins_jobs.builder:Ignoring job foo
DEBUG:jenkins_jobs.builder:XMLifying job 'emily'

Output when it works incorrectly:

$ jenkins-jobs --conf ~/devtools/jenkins-job-builder/etc/jenkins_jobs.ini-sample -l debug update input emily
DEBUG:root:Reading config from ~/devtools/jenkins-job-builder/etc/jenkins_jobs.ini-sample
DEBUG:root:Config: <ConfigParser.ConfigParser instance at 0x1506ea8>
INFO:root:Updating jobs in input (['emily'])
DEBUG:jenkins_jobs.builder:Parsing YAML file input/template.yaml
DEBUG:jenkins_jobs.builder:Parsing YAML file input/foo.yaml
DEBUG:jenkins_jobs.builder:Parsing YAML file input/emily.yaml
DEBUG:jenkins_jobs.builder:XMLifying project 'foo'
DEBUG:jenkins_jobs.builder:XMLifying project 'emily'

It should never have tried to do XMLifying project 'foo'

Tags: jjb
Revision history for this message
Emily Bache (emily-bache) wrote :

I just submitted a pull request with a fix

https://github.com/openstack-infra/jenkins-job-builder/pull/10

Revision history for this message
Elizabeth K. Joseph (lyz) wrote :

Thanks for taking a look at this! However we only use github as a mirror, all pull requests are automatically closed.

Can you submit this patch via our standard contribution workflow with Gerrit: https://wiki.openstack.org/wiki/Gerrit_Workflow so it can be reviewed?

tags: added: jjb
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to jenkins-job-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/68984

Changed in openstack-ci:
status: New → In Progress
Khai Do (zaro0508)
Changed in openstack-ci:
assignee: nobody → Khai Do (zaro0508)
Khai Do (zaro0508)
Changed in openstack-ci:
assignee: Khai Do (zaro0508) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.