From b0563141858d940b5e0d264e9b80767ccd6645ba Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 4 Mar 2013 21:26:37 -0800 Subject: [PATCH] Select a pypi mirror before running tox. Change-Id: I62a86b6a0ad30ff8cb387ddcc05668128248c6d0 Reviewed-on: https://review.openstack.org/23513 Reviewed-by: Jeremy Stanley Approved: James E. Blair Tested-by: Jenkins --- .../jenkins_job_builder/config/heat.yaml | 9 +++++-- .../jenkins_job_builder/config/horizon.yaml | 4 ++- .../config/job-builder.yaml | 4 ++- .../jenkins_job_builder/config/macros.yaml | 23 +++++----------- .../config/openstack-ci-puppet.yaml | 12 ++++++--- .../config/openstack-publish-jobs.yaml | 4 ++- .../config/python-bitrot-jobs.yaml | 4 ++- .../config/python-jobs.yaml | 26 ++++++++++++++----- .../jenkins_job_builder/config/zuul.yaml | 8 ++++-- tools/run-compare-xml.sh | 14 ++++++++++ tools/run-layout.sh | 14 ++++++++++ 11 files changed, 87 insertions(+), 35 deletions(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/heat.yaml b/modules/openstack_project/files/jenkins_job_builder/config/heat.yaml index c0db628111..59107ee7db 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/heat.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/heat.yaml @@ -7,11 +7,14 @@ builders: - gerrit-git-prep - - coverage + - coverage: + github-org: openstack + project: heat publishers: - coverage-log - console-log + - job: name: 'dev-python-heatclient-coverage' node: 'oneiric' @@ -21,7 +24,9 @@ builders: - gerrit-git-prep - - coverage + - coverage: + github-org: openstack + project: python-heatclient publishers: - coverage-log diff --git a/modules/openstack_project/files/jenkins_job_builder/config/horizon.yaml b/modules/openstack_project/files/jenkins_job_builder/config/horizon.yaml index 00b81303ee..6847773bf6 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/horizon.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/horizon.yaml @@ -7,7 +7,9 @@ builders: - gerrit-git-prep - - selenium + - selenium: + github-org: openstack + project: horizon publishers: - console-log diff --git a/modules/openstack_project/files/jenkins_job_builder/config/job-builder.yaml b/modules/openstack_project/files/jenkins_job_builder/config/job-builder.yaml index 115ecd00da..70deb2f7ab 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/job-builder.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/job-builder.yaml @@ -8,7 +8,9 @@ builders: - gerrit-git-prep - - docs + - docs: + github-org: openstack-infra + project: jenkins-job-builder publishers: - scp: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 565def805b..4162d4c955 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -6,12 +6,12 @@ - builder: name: coverage builders: - - shell: "/usr/local/jenkins/slave_scripts/run-cover.sh" + - shell: "/usr/local/jenkins/slave_scripts/run-cover.sh {github-org} {project}" - builder: name: docs builders: - - shell: "/usr/local/jenkins/slave_scripts/run-docs.sh" + - shell: "/usr/local/jenkins/slave_scripts/run-docs.sh {github-org} {project}" - builder: name: maven-test @@ -50,17 +50,17 @@ - builder: name: pep8 builders: - - shell: "set -o pipefail ; tox -v -epep8 | tee pep8.txt ; set +o pipefail" + - shell: "/usr/local/jenkins/slave_scripts/run-pep8.sh {github-org} {project}" - builder: name: pylint builders: - - shell: "set -o pipefail ; tox -v -epylint | tee pylint.txt ; set +o pipefail" + - shell: "/usr/local/jenkins/slave_scripts/run-pylint.sh {github-org} {project}" - builder: name: pyflakes builders: - - shell: "tox -v -epyflakes" + - shell: "/usr/local/jenkins/slave_scripts/run-pyflakes.sh {github-org} {project}" - builder: name: puppet-syntax @@ -74,7 +74,7 @@ - builder: name: selenium builders: - - shell: "/usr/local/jenkins/slave_scripts/run-selenium.sh" + - shell: "/usr/local/jenkins/slave_scripts/run-selenium.sh {github-org} {project}" - builder: name: python26 @@ -114,16 +114,7 @@ - builder: name: tarball builders: - - shell: | - #!/bin/bash -xe - - rm -f dist/*.tar.gz - tox -evenv python setup.py sdist - - echo "SHA1sum: " - sha1sum dist/* - echo "MD5sum: " - md5sum dist/* + - shell: "/usr/local/jenkins/slave_scripts/run-tarball.sh {github-org} {project}" - builder: name: devstack-checkout diff --git a/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml b/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml index 70682fde22..241544e2fd 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/openstack-ci-puppet.yaml @@ -8,7 +8,9 @@ builders: - gerrit-git-prep - puppet-syntax - - pyflakes + - pyflakes: + github-org: openstack-infra + project: config publishers: - console-log @@ -38,7 +40,7 @@ builders: - gerrit-git-prep - - shell: "./tools/run-compare-xml.sh" + - shell: "./tools/run-compare-xml.sh openstack-infra config" publishers: - console-log @@ -53,7 +55,7 @@ builders: - gerrit-git-prep - - shell: "./tools/run-layout.sh" + - shell: "./tools/run-layout.sh openstack-infra config" publishers: - console-log @@ -69,7 +71,9 @@ builders: - gerrit-git-prep - - docs + - docs: + github-org: openstack-infra + project: config publishers: - scp: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/openstack-publish-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/openstack-publish-jobs.yaml index d48a118ffd..741a8affd5 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/openstack-publish-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/openstack-publish-jobs.yaml @@ -7,7 +7,9 @@ builders: - gerrit-git-prep - - docs + - docs: + github-org: '{github-org}' + project: '{name}' publishers: - ftp: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/python-bitrot-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/python-bitrot-jobs.yaml index b603b66d2b..ee005b2d24 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/python-bitrot-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/python-bitrot-jobs.yaml @@ -70,7 +70,9 @@ - timed: '0 6 * * *' builders: - - docs + - docs: + github-org: '{github-org}' + project: '{name}' publishers: - console-log-periodic diff --git a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml index 5a1bb35eb7..77fc276c54 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/python-jobs.yaml @@ -12,7 +12,9 @@ builders: - gerrit-git-prep - - coverage + - coverage: + github-org: '{github-org}' + project: '{name}' publishers: - coverage-log-post @@ -29,7 +31,9 @@ builders: - gerrit-git-prep - - pep8 + - pep8: + github-org: '{github-org}' + project: '{name}' publishers: - pep8 @@ -46,7 +50,9 @@ builders: - gerrit-git-prep - - pylint + - pylint: + github-org: '{github-org}' + project: '{name}' publishers: - pylint @@ -215,7 +221,9 @@ builders: - gerrit-git-prep - - docs + - docs: + github-org: '{github-org}' + project: '{name}' publishers: - console-log @@ -232,7 +240,9 @@ builders: - gerrit-git-prep - - pyflakes + - pyflakes: + github-org: '{github-org}' + project: '{name}' publishers: - console-log @@ -248,6 +258,7 @@ builders: - gerrit-git-prep - tarball: + github-org: '{github-org}' project: '{name}' publishers: @@ -267,12 +278,13 @@ builders: - gerrit-git-prep + - tarball: + github-org: '{github-org}' + project: '{name}' - shell: | #!/bin/bash -xe BRANCH=$ZUUL_REFNAME BRANCH_PATH=`echo $BRANCH | tr / -` - - tox -v -evenv python setup.py sdist mv dist/* dist/{name}-$BRANCH_PATH.tar.gz publishers: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/zuul.yaml b/modules/openstack_project/files/jenkins_job_builder/config/zuul.yaml index 88e62a42a8..37210060c6 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/zuul.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/zuul.yaml @@ -8,7 +8,9 @@ builders: - gerrit-git-prep - - docs + - docs: + github-org: openstack-infra + project: zuul publishers: - scp: @@ -28,7 +30,9 @@ builders: - gerrit-git-prep - - coverage + - coverage: + github-org: openstack-infra + project: zuul publishers: - coverage-log diff --git a/tools/run-compare-xml.sh b/tools/run-compare-xml.sh index e7c3556e30..4713d93041 100755 --- a/tools/run-compare-xml.sh +++ b/tools/run-compare-xml.sh @@ -16,6 +16,20 @@ # License for the specific language governing permissions and limitations # under the License. +org=$1 +project=$2 + +if [[ -z "$org" || -z "$project" ]] +then + echo "Usage: $0 ORG PROJECT" + echo + echo "ORG: The project organization (eg 'openstack')" + echo "PROJECT: The project name (eg 'nova')" + #TODO: make fatal in subsequent change: exit 1 +else + /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project +fi + rm -fr .test mkdir .test cd .test diff --git a/tools/run-layout.sh b/tools/run-layout.sh index 55cf3144fd..574cf9d0d3 100755 --- a/tools/run-layout.sh +++ b/tools/run-layout.sh @@ -14,6 +14,20 @@ # License for the specific language governing permissions and limitations # under the License. +org=$1 +project=$2 + +if [[ -z "$org" || -z "$project" ]] +then + echo "Usage: $0 ORG PROJECT" + echo + echo "ORG: The project organization (eg 'openstack')" + echo "PROJECT: The project name (eg 'nova')" + #TODO: make fatal in subsequent change: exit 1 +else + /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project +fi + rm -fr .test mkdir .test cd .test