upload-pypi: basic testing
Very basic testing to include the ensure-twine and upload-pypi role. This really just does a syntax and sanity check. Change-Id: Ie40ec32b3b2ffc4646301c6e145c527fe6a3bae2
This commit is contained in:
parent
ffe4f4fea5
commit
7adb0c3b4a
30
test-playbooks/python/upload-pypi.yaml
Normal file
30
test-playbooks/python/upload-pypi.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
|
||||
- name: Install twine
|
||||
include_role:
|
||||
name: ensure-twine
|
||||
|
||||
- name: Setup role failure var
|
||||
set_fact:
|
||||
_role_failed: false
|
||||
|
||||
- name: Wrap arg failure
|
||||
block:
|
||||
- name: Check for argument failure
|
||||
include_role:
|
||||
name: upload-pypi
|
||||
vars:
|
||||
pypi_info:
|
||||
username: a_user
|
||||
api_token: a_token
|
||||
|
||||
rescue:
|
||||
- name: Mark role as failed
|
||||
set_fact:
|
||||
_role_failed: true
|
||||
|
||||
- name: Check role failed
|
||||
fail:
|
||||
msg: 'upload-pypi did not fail as it should'
|
||||
when: _role_failed is not true
|
@ -323,11 +323,6 @@
|
||||
- zuul/zuul
|
||||
- zuul/nodepool
|
||||
|
||||
# -* AUTOGENERATED *-
|
||||
# The following project section is autogenerated by
|
||||
# tox -e update-test-platforms
|
||||
# Please re-run to generate new job lists
|
||||
|
||||
- job:
|
||||
name: zuul-jobs-test-fetch-tox-output
|
||||
description: Test the fetch-tox-output
|
||||
@ -412,6 +407,18 @@
|
||||
vars:
|
||||
zuul_use_fetch_output: false
|
||||
|
||||
- job:
|
||||
name: zuul-jobs-test-upload-pypi
|
||||
description: Test the upload-pypi role
|
||||
files:
|
||||
- roles/upload-pypi/.*
|
||||
run: test-playbooks/python/upload-pypi.yaml
|
||||
|
||||
# -* AUTOGENERATED *-
|
||||
# The following project section is autogenerated by
|
||||
# tox -e update-test-platforms
|
||||
# Please re-run to generate new job lists
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs: &id001
|
||||
@ -452,6 +459,7 @@
|
||||
- zuul-jobs-test-fetch-sphinx-output-synchronize
|
||||
- zuul-jobs-test-fetch-sphinx-tarball-with-zuul-output
|
||||
- zuul-jobs-test-fetch-sphinx-tarball-synchronize
|
||||
- zuul-jobs-test-upload-pypi
|
||||
gate:
|
||||
jobs: *id001
|
||||
periodic-weekly:
|
||||
|
Loading…
Reference in New Issue
Block a user