Add publish-openstack-python-branch-tarball job

publish-openstack-python-branch-tarball is a trusted job now. The
majority of this log comes from openstack-zuul-jobs.

Change-Id: Ie50b45296074b12cd17229bdd2bb57c0d40290ec
Depends-On: Ie577aa1c603158b1a71f8107113de51bddc1a771
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-08-17 14:30:38 -04:00
parent f332abf550
commit 4c121fe599
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,38 @@
- hosts: all
roles:
- fetch-tox-output
post_tasks:
- name: Rename files to branch specific name
shell: "mv *.{{ item }} {{ zuul.project.short_name }}-{{ zuul.branch | replace('/', '-') }}.{{ item }}"
args:
chdir: "src/{{ zuul.project.canonical_name }}/dist"
with_items:
- "tar.gz"
- "whl"
- name: Find tarballs and wheels in dist folder
find:
file_type: file
paths: "src/{{ zuul.project.canonical_name }}/dist"
patterns: "*.tar.gz,*.whl"
register: result
- name: Display stat for tarballs and wheels
stat:
path: "{{ item.path }}"
with_items: "{{ result.files }}"
- name: Ensure artifacts directory exists
file:
path: "{{ zuul.executor.work_root }}/artifacts"
state: directory
delegate_to: localhost
- name: Collect artifacts
synchronize:
dest: "{{ zuul.executor.work_root }}/artifacts/"
mode: pull
src: "{{ item.path }}"
verify_host: true
with_items: "{{ result.files }}"

View File

@ -0,0 +1,8 @@
- hosts: all
roles:
- role: bindep
bindep_profile: test
bindep_dir: "src/{{ zuul.project.canonical_name }}"
bindep_command: /usr/bindep-env/bin/bindep
bindep_fallback: /usr/local/jenkins/common_data/bindep-fallback.txt
- revoke-sudo

View File

@ -0,0 +1,10 @@
- hosts: all
pre_tasks:
- name: Ensure tox is installed
shell: type tox || pip install --user tox
roles:
- role: tox
tox_extra_args: -vv python setup.py sdist
- role: tox
tox_extra_args: -vv python setup.py bdist_wheel

View File

@ -173,6 +173,15 @@
secrets:
- testpypi_secret
- job:
name: publish-openstack-python-branch-tarball
parent: publish-openstack-artifacts
description: |
Publish the results of the tox-tarball job to tarballs.openstack.org.
pre-run: playbooks/python-tarball/pre
run: playbooks/python-tarball/run
post-run: playbooks/python-branch-tarball/post
- project:
name: openstack-infra/project-config
check: