Skip to content

Fix incorrect job generation of OPTIONS variable

Ben Morrice requested to merge fixgeneratejobs into master
  • without this patch, extra variables from previously defined jobs can be defined

The following shows an example of the current broken behaviour:

[morrice@localhost rsync]$ grep centosvault prod.repos.yaml -A6
centosvault:
  source: 'vault.centos.org::centos-full-store/'
  destination: 'centos-vault/'
  extra_options:
    - -aqz
    - --delete

[morrice@localhost rsync]$ grep defaults prod.repos.yaml -A12
defaults:
  schedule: '0 */6 * * *'
  tool: 'rsync'
  top: '/mnt/data1/dist'
  options:
    - -HrlptDv
    - --timeout=3600
    - --max-delete=5000
    - --safe-links
    - --delay-updates
    - --delete-after
    - --exclude=.*rpm.?*

[morrice@localhost rsync]$ python generateJobs.py -c prod.repos.yaml
Generated job: dev_rsync_epel.nomad
Generated job: dev_rsync_scientific-linux.nomad
Generated job: dev_rsync_fedora.nomad
Generated job: dev_rsync_wlcg.nomad
Generated job: dev_rsync_elrepo.nomad
Generated job: dev_rsync_repoforge.nomad
Generated job: dev_rsync_centosvault.nomad
[morrice@localhost rsync]$ grep OPTIONS dev_rsync_centosvault.nomad 
      OPTIONS = "-HrlptDv --timeout=3600 --max-delete=5000 --safe-links --delay-updates --delete-after --exclude=.*rpm.?* --exclude=obsolete/ --max-delete=5000 --timeout=6000 --exclude=private/ --max-delete=500 --timeout=300 --exclude=favicon.ico -ai4C --exclude=redhat/el2.1 --exclude=redhat/el3 --exclude=redhat/el4 -aqz --delete"

Merge request reports