diff --git a/jenkins/jobs/macros.yaml b/jenkins/jobs/macros.yaml index 22875ef13d..9e3d1421bc 100644 --- a/jenkins/jobs/macros.yaml +++ b/jenkins/jobs/macros.yaml @@ -491,8 +491,8 @@ builders: - shell: | #!/bin/bash -xe - /usr/local/jenkins/slave_scripts/run-tarball.sh - /usr/local/jenkins/slave_scripts/run-wheel.sh + /usr/local/jenkins/slave_scripts/run-tarball.sh {env} + /usr/local/jenkins/slave_scripts/run-wheel.sh {env} - builder: name: devstack-checkout diff --git a/jenkins/jobs/python-jobs.yaml b/jenkins/jobs/python-jobs.yaml index 3cb3866ed8..8f8867e928 100644 --- a/jenkins/jobs/python-jobs.yaml +++ b/jenkins/jobs/python-jobs.yaml @@ -309,7 +309,8 @@ builders: - revoke-sudo - gerrit-git-prep - - tarball + - tarball: + env: venv publishers: - tarball: @@ -321,6 +322,25 @@ - console-log - zuul-swift-upload-console-log +- job-template: + name: '{name}-tarball-constraints' + node: 'bare-precise || bare-trusty' + + builders: + - zuul-git-prep-upper-constraints + - revoke-sudo + - tarball: + env: venv-constraints + + publishers: + - tarball: + project: '{name}' + site: '{tarball-site}' + - wheel: + project: '{name}' + site: '{tarball-site}' + - console-log + - zuul-swift-upload-console-log - job-template: name: '{name}-branch-tarball' @@ -329,7 +349,8 @@ builders: - revoke-sudo - gerrit-git-prep - - tarball + - tarball: + env: venv - shell: | #!/bin/bash -xe BRANCH=$ZUUL_REFNAME @@ -343,6 +364,27 @@ - console-log - zuul-swift-upload-console-log +- job-template: + name: '{name}-branch-tarball-constraints' + node: 'bare-precise || bare-trusty' + + builders: + - revoke-sudo + - zuul-git-prep-upper-constraints + - tarball: + env: venv-constraints + - shell: | + #!/bin/bash -xe + BRANCH=$ZUUL_REFNAME + BRANCH_PATH=`echo $BRANCH | tr / -` + mv dist/*.tar.gz dist/{name}-$BRANCH_PATH.tar.gz + + publishers: + - tarball: + project: '{name}' + site: '{tarball-site}' + - console-log + - zuul-swift-upload-console-log - job-template: name: 'gate-{name}-requirements' @@ -409,3 +451,5 @@ - 'gate-{name}-python34-constraints' - 'gate-{name}-pypy-constraints' - 'gate-{name}-docs-constraints' + - '{name}-tarball-constraints' + - '{name}-branch-tarball-constraints' diff --git a/jenkins/scripts/run-tarball.sh b/jenkins/scripts/run-tarball.sh index 9261f759cb..7a5de5e8f5 100755 --- a/jenkins/scripts/run-tarball.sh +++ b/jenkins/scripts/run-tarball.sh @@ -14,8 +14,12 @@ # License for the specific language governing permissions and limitations # under the License. +venv=${1:-venv} + +export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt + rm -f dist/*.tar.gz -tox -evenv python setup.py sdist +tox -e$venv python setup.py sdist FILES=dist/*.tar.gz for f in $FILES; do diff --git a/jenkins/scripts/run-wheel.sh b/jenkins/scripts/run-wheel.sh index 648e11f750..7b3048e2c3 100644 --- a/jenkins/scripts/run-wheel.sh +++ b/jenkins/scripts/run-wheel.sh @@ -14,9 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. +venv=${1:-venv} + +export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt + rm -f dist/*.whl -tox -evenv pip install wheel -tox -evenv python setup.py bdist_wheel +tox -e$venv pip install wheel +tox -e$venv python setup.py bdist_wheel FILES=dist/*.whl for f in $FILES; do diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 35c5b79445..eb3be263d4 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -266,6 +266,8 @@ project-templates: - 'gate-{name}-docs-constraints' - 'gate-{name}-pep8-constraints' - 'gate-{name}-python27-constraints' + post: + - '{name}-branch-tarball-constraints' - name: grenade check: @@ -457,6 +459,13 @@ project-templates: - '{name}-tarball' - '{name}-merge-release-tags' + - name: openstack-server-release-jobs-constraints + pre-release: + - '{name}-tarball-constraints' + release: + - '{name}-tarball-constraints' + - '{name}-merge-release-tags' + - name: docs-on-rtfd post: - 'hook-{name}-rtfd'