From 6a5392603ea4c685f6e7336a04b4fb99cd046ed1 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 10 Aug 2012 09:16:27 -0700 Subject: [PATCH] Change all '_' to '-' in YAML for consistency. Change-Id: If19cb26fa544b485acfc188baf3506eaea61d6cf Reviewed-on: https://review.openstack.org/11154 Reviewed-by: Monty Taylor Approved: James E. Blair Tested-by: Jenkins --- example/ceilometer.yml | 8 ++-- example/devstack-gate.yml | 10 ++--- example/devstack.yml | 2 +- example/gerrit-verification-status-plugin.yml | 2 +- example/gerrit.yml | 40 +++++++++---------- example/gerritbot.yml | 8 ++-- example/gerritlib.yml | 4 +- example/horizon.yml | 2 +- example/jenkins-job-builder.yml | 2 +- example/macros.yml | 18 ++++----- example/mraas.yml | 4 +- example/openstack-ci-puppet.yml | 6 +-- example/openstack-publish-jobs.yml | 8 ++-- example/pypi-jobs.yml | 8 ++-- example/pypi-mirror.yml | 4 +- example/python-jobs.yml | 16 ++++---- example/requirements.yml | 2 +- example/tempest.yml | 4 +- example/zuul.yml | 6 +-- jenkins_jobs/modules/builders.py | 4 +- jenkins_jobs/modules/project_maven.py | 6 ++- jenkins_jobs/modules/publishers.py | 4 +- jenkins_jobs/modules/zuul.py | 6 +-- 23 files changed, 88 insertions(+), 86 deletions(-) diff --git a/example/ceilometer.yml b/example/ceilometer.yml index a17dbc532..6a478305d 100644 --- a/example/ceilometer.yml +++ b/example/ceilometer.yml @@ -37,8 +37,8 @@ - zuul builders: - - gerrit_git_prep - - python26_essex + - gerrit-git-prep + - python26-essex # >= precise does not have python2.6 node: oneiric @@ -74,7 +74,7 @@ - zuul builders: - - gerrit_git_prep - - python27_essex + - gerrit-git-prep + - python27-essex node: oneiric diff --git a/example/devstack-gate.yml b/example/devstack-gate.yml index c26a1fe59..5f80df29f 100644 --- a/example/devstack-gate.yml +++ b/example/devstack-gate.yml @@ -29,7 +29,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - job: @@ -69,7 +69,7 @@ builders: - trigger-builds: - project: devstack-update-inprogress - predefined_parameters: + predefined-parameters: DEVSTACK_NODE_NAME=${NODE_NAME} - shell: | #!/bin/bash -xe @@ -103,7 +103,7 @@ - trigger-parameterized-builds: - project: devstack-update-complete when: complete - predefined_parameters: + predefined-parameters: DEVSTACK_NODE_NAME=${NODE_NAME} @@ -144,7 +144,7 @@ builders: - trigger-builds: - project: devstack-update-inprogress - predefined_parameters: + predefined-parameters: DEVSTACK_NODE_NAME=${NODE_NAME} - shell: | #!/bin/bash -xe @@ -179,7 +179,7 @@ - trigger-parameterized-builds: - project: devstack-update-complete when: complete - predefined_parameters: + predefined-parameters: DEVSTACK_NODE_NAME=${NODE_NAME} diff --git a/example/devstack.yml b/example/devstack.yml index e78ddf03c..86ff6434f 100644 --- a/example/devstack.yml +++ b/example/devstack.yml @@ -30,4 +30,4 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep diff --git a/example/gerrit-verification-status-plugin.yml b/example/gerrit-verification-status-plugin.yml index 264a1cded..9d1f5b826 100644 --- a/example/gerrit-verification-status-plugin.yml +++ b/example/gerrit-verification-status-plugin.yml @@ -30,6 +30,6 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep node: precise diff --git a/example/gerrit.yml b/example/gerrit.yml index 3f200cc28..259f02814 100644 --- a/example/gerrit.yml +++ b/example/gerrit.yml @@ -31,7 +31,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep node: precise @@ -60,17 +60,17 @@ - zuul prebuilders: - - gerrit_git_prep - - gerrit_preclean + - gerrit-git-prep + - gerrit-preclean maven: - root_module: - group_id: com.google.gerrit - artifact_id: gerrit-parent + root-module: + group-id: com.google.gerrit + artifact-id: gerrit-parent goals: 'clean package -Dgerrit.include-documentation=1 -X' postbuilders: - - gerrit_postrun + - gerrit-postrun publishers: - war: @@ -103,17 +103,17 @@ - zuul prebuilders: - - gerrit_git_prep - - gerrit_preclean + - gerrit-git-prep + - gerrit-preclean maven: - root_module: - group_id: com.google.gerrit - artifact_id: gerrit-parent + root-module: + group-id: com.google.gerrit + artifact-id: gerrit-parent goals: 'clean package -Dgerrit.include-documentation=1 -X' postbuilders: - - gerrit_postrun + - gerrit-postrun - job: @@ -137,20 +137,20 @@ enabled: false triggers: - - zuul_post + - zuul-post prebuilders: - - gerrit_git_prep - - gerrit_preclean + - gerrit-git-prep + - gerrit-preclean maven: - root_module: - group_id: com.google.gerrit - artifact_id: gerrit-parent + root-module: + group-id: com.google.gerrit + artifact-id: gerrit-parent goals: 'clean package -Dgerrit.include-documentation=1 -X' postbuilders: - - gerrit_postrun + - gerrit-postrun publishers: - war: diff --git a/example/gerritbot.yml b/example/gerritbot.yml index b5ba6b380..6e2828c20 100644 --- a/example/gerritbot.yml +++ b/example/gerritbot.yml @@ -34,7 +34,7 @@ fail: true triggers: - - zuul_post + - zuul-post logrotate: daysToKeep: 28 @@ -43,7 +43,7 @@ artifactNumToKeep: -1 builders: - - gerrit_git_prep + - gerrit-git-prep - shell: | #!/bin/bash -xe BRANCH=$GERRIT_REFNAME @@ -78,10 +78,10 @@ fail: true triggers: - - zuul_post + - zuul-post builders: - - gerrit_git_prep + - gerrit-git-prep - shell: tox -v -evenv python setup.py sdist upload publishers: diff --git a/example/gerritlib.yml b/example/gerritlib.yml index 1e775c9e5..416d77269 100644 --- a/example/gerritlib.yml +++ b/example/gerritlib.yml @@ -33,10 +33,10 @@ - timestamps triggers: - - zuul_post + - zuul-post builders: - - gerrit_git_prep + - gerrit-git-prep - shell: tox -v -evenv python setup.py sdist upload publishers: diff --git a/example/horizon.yml b/example/horizon.yml index 92970a1b7..6e73ecb2e 100644 --- a/example/horizon.yml +++ b/example/horizon.yml @@ -39,5 +39,5 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - selenium diff --git a/example/jenkins-job-builder.yml b/example/jenkins-job-builder.yml index 29f395294..ee2671054 100644 --- a/example/jenkins-job-builder.yml +++ b/example/jenkins-job-builder.yml @@ -31,4 +31,4 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep diff --git a/example/macros.yml b/example/macros.yml index 8af5dcad1..9e628ffd9 100644 --- a/example/macros.yml +++ b/example/macros.yml @@ -1,5 +1,5 @@ - builder: - name: gerrit_git_prep + name: gerrit-git-prep builders: - shell: "/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh review.openstack.org" @@ -14,28 +14,28 @@ - shell: "/usr/local/jenkins/slave_scripts/run-docs.sh" - builder: - name: maven_test + name: maven-test builders: - shell: "mvn test" - builder: - name: maven_package + name: maven-package builders: - shell: "mvn package" - builder: - name: gerrit_package + name: gerrit-package builders: - shell: "/usr/local/jenkins/slave_scripts/package-gerrit.sh" - builder: - name: gerrit_preclean + name: gerrit-preclean #TODO: multiline: builders: - shell: "#!/bin/bash -xe\nrm -fr ~/.m2\nrm -fr ~/.java\n./tools/version.sh --release" - builder: - name: gerrit_postrun + name: gerrit-postrun builders: - shell: "./tools/version.sh --reset" @@ -50,7 +50,7 @@ - shell: "tox -v -epyflakes" - builder: - name: puppet_syntax + name: puppet-syntax builders: # TODO: remove blank line - shell: | @@ -78,12 +78,12 @@ - shell: "/usr/local/jenkins/slave_scripts/run-tox.sh 27" - builder: - name: python26_essex + name: python26-essex builders: - shell: "/usr/local/jenkins/slave_scripts/run-tox.sh 26-essex" - builder: - name: python27_essex + name: python27-essex builders: - shell: "/usr/local/jenkins/slave_scripts/run-tox.sh 27-essex" diff --git a/example/mraas.yml b/example/mraas.yml index e148cef2c..78f8b87ad 100644 --- a/example/mraas.yml +++ b/example/mraas.yml @@ -39,7 +39,7 @@ branchPattern: '**' builders: - - gerrit_git_prep + - gerrit-git-prep - job: @@ -79,4 +79,4 @@ branchPattern: '**' builders: - - gerrit_git_prep + - gerrit-git-prep diff --git a/example/openstack-ci-puppet.yml b/example/openstack-ci-puppet.yml index 668039061..b2046e9a4 100644 --- a/example/openstack-ci-puppet.yml +++ b/example/openstack-ci-puppet.yml @@ -31,7 +31,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - job: @@ -58,6 +58,6 @@ - zuul builders: - - gerrit_git_prep - - puppet_syntax + - gerrit-git-prep + - puppet-syntax - pyflakes diff --git a/example/openstack-publish-jobs.yml b/example/openstack-publish-jobs.yml index a78c53f35..51398a7fe 100644 --- a/example/openstack-publish-jobs.yml +++ b/example/openstack-publish-jobs.yml @@ -20,7 +20,7 @@ - timestamps triggers: - - zuul_post + - zuul-post logrotate: daysToKeep: 28 @@ -29,7 +29,7 @@ artifactNumToKeep: -1 builders: - - gerrit_git_prep + - gerrit-git-prep - docs publishers: @@ -62,7 +62,7 @@ - timestamps triggers: - - zuul_post + - zuul-post logrotate: daysToKeep: 28 @@ -71,7 +71,7 @@ artifactNumToKeep: -1 builders: - - gerrit_git_prep + - gerrit-git-prep - tarball: project: '{name}' diff --git a/example/pypi-jobs.yml b/example/pypi-jobs.yml index 68fc96559..c9c0d889c 100644 --- a/example/pypi-jobs.yml +++ b/example/pypi-jobs.yml @@ -20,7 +20,7 @@ - timestamps triggers: - - zuul_post + - zuul-post logrotate: daysToKeep: 28 @@ -29,7 +29,7 @@ artifactNumToKeep: -1 builders: - - gerrit_git_prep + - gerrit-git-prep - shell: | #!/bin/bash -xe BRANCH=$GERRIT_REFNAME @@ -66,10 +66,10 @@ - timestamps triggers: - - zuul_post + - zuul-post builders: - - gerrit_git_prep + - gerrit-git-prep - shell: tox -v -evenv python setup.py sdist upload publishers: diff --git a/example/pypi-mirror.yml b/example/pypi-mirror.yml index bed7e5808..fd29d85e6 100644 --- a/example/pypi-mirror.yml +++ b/example/pypi-mirror.yml @@ -33,7 +33,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - job: name: gate-pypi-mirror-pyflakes @@ -60,5 +60,5 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - pyflakes diff --git a/example/python-jobs.yml b/example/python-jobs.yml index 20233bb8d..55c245899 100644 --- a/example/python-jobs.yml +++ b/example/python-jobs.yml @@ -24,10 +24,10 @@ artifactNumToKeep: -1 triggers: - - zuul_post + - zuul-post builders: - - gerrit_git_prep + - gerrit-git-prep - coverage publishers: @@ -65,7 +65,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - pep8 publishers: @@ -103,7 +103,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - python26 # >= precise does not have python2.6 @@ -145,7 +145,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - python27 node: '{node}' @@ -180,7 +180,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep node: '{node}' @@ -214,7 +214,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - docs node: '{node}' @@ -251,7 +251,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - pyflakes diff --git a/example/requirements.yml b/example/requirements.yml index c0c01a942..de6734557 100644 --- a/example/requirements.yml +++ b/example/requirements.yml @@ -29,6 +29,6 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep node: precise diff --git a/example/tempest.yml b/example/tempest.yml index 4f4739b0a..edaf0ebe0 100644 --- a/example/tempest.yml +++ b/example/tempest.yml @@ -31,7 +31,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep node: precise @@ -58,7 +58,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - pep8 publishers: diff --git a/example/zuul.yml b/example/zuul.yml index bbe44c0b6..e5db8f9a1 100644 --- a/example/zuul.yml +++ b/example/zuul.yml @@ -33,7 +33,7 @@ - zuul builders: - - gerrit_git_prep + - gerrit-git-prep - pyflakes @@ -59,7 +59,7 @@ - timestamps triggers: - - zuul_post + - zuul-post logrotate: daysToKeep: 28 @@ -68,7 +68,7 @@ artifactNumToKeep: -1 builders: - - gerrit_git_prep + - gerrit-git-prep - docs publishers: diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py index 5697cff84..60348fc1a 100644 --- a/jenkins_jobs/modules/builders.py +++ b/jenkins_jobs/modules/builders.py @@ -35,11 +35,11 @@ def trigger_builds(parser, xml_parent, data): tconfig = XML.SubElement(configs, 'hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig') tconfigs = XML.SubElement(tconfig, 'configs') - if project_def.has_key('predefined_parameters'): + if project_def.has_key('predefined-parameters'): params = XML.SubElement(tconfigs, 'hudson.plugins.parameterizedtrigger.PredefinedBuildParameters') properties = XML.SubElement(params, 'properties') - properties.text = project_def['predefined_parameters'] + properties.text = project_def['predefined-parameters'] else: tconfigs.set('class', 'java.util.Collections$EmptyList') projects = XML.SubElement(tconfig, 'projects') diff --git a/jenkins_jobs/modules/project_maven.py b/jenkins_jobs/modules/project_maven.py index 0b775c0d7..bb4af9049 100644 --- a/jenkins_jobs/modules/project_maven.py +++ b/jenkins_jobs/modules/project_maven.py @@ -31,8 +31,10 @@ class Maven(jenkins_jobs.modules.base.Base): return None xml_parent = XML.Element('maven2-moduleset') root_module = XML.SubElement(xml_parent, 'root_module') - XML.SubElement(root_module, 'groupId').text = data['maven']['root_module']['group_id'] - XML.SubElement(root_module, 'artifactId').text = data['maven']['root_module']['artifact_id'] + XML.SubElement(root_module, 'groupId').text = \ + data['maven']['root-module']['group-id'] + XML.SubElement(root_module, 'artifactId').text = \ + data['maven']['root-module']['artifact-id'] XML.SubElement(xml_parent, 'goals').text = data['maven']['goals'] XML.SubElement(xml_parent, 'aggregatorStyleBuild').text = 'true' diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index eaf8104cb..2fd1639bf 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py @@ -40,11 +40,11 @@ def trigger_parameterized_builds(parser, xml_parent, data): tconfig = XML.SubElement(configs, 'hudson.plugins.parameterizedtrigger.BuildTriggerConfig') tconfigs = XML.SubElement(tconfig, 'configs') - if project_def.has_key('predefined_parameters'): + if project_def.has_key('predefined-parameters'): params = XML.SubElement(tconfigs, 'hudson.plugins.parameterizedtrigger.PredefinedBuildParameters') properties = XML.SubElement(params, 'properties') - properties.text = project_def['predefined_parameters'] + properties.text = project_def['predefined-parameters'] else: tconfigs.set('class', 'java.util.Collections$EmptyList') projects = XML.SubElement(tconfig, 'projects') diff --git a/jenkins_jobs/modules/zuul.py b/jenkins_jobs/modules/zuul.py index 338a50f07..c715387c6 100644 --- a/jenkins_jobs/modules/zuul.py +++ b/jenkins_jobs/modules/zuul.py @@ -68,7 +68,7 @@ class Zuul(jenkins_jobs.modules.base.Base): continue if ('zuul' not in job.get('triggers', []) and - 'zuul_post' not in job.get('triggers', [])): + 'zuul-post' not in job.get('triggers', [])): continue if 'parameters' not in job: job['parameters'] = [] @@ -78,8 +78,8 @@ class Zuul(jenkins_jobs.modules.base.Base): if 'zuul' in job.get('triggers', []): job['parameters'].extend(ZUUL_PARAMETERS) job['triggers'].remove('zuul') - if 'zuul_post' in job.get('triggers', []): + if 'zuul-post' in job.get('triggers', []): job['parameters'].extend(ZUUL_POST_PARAMETERS) - job['triggers'].remove('zuul_post') + job['triggers'].remove('zuul-post') changed = True return changed