Fix: Add post-run into publish job
1. Add post-run into publish job 2. Update skyline-console submodule Change-Id: Idd7263ed69f14fadf54f0850beb5bcbb930f672d
This commit is contained in:
parent
4b0fd453cc
commit
f1d38b6524
@ -49,6 +49,7 @@
|
||||
Publish the results tar.gz and whl packages to tarballs.openstack.org.
|
||||
pre-run: playbooks/python-tarball/pre.yaml
|
||||
run: playbooks/python-tarball/run.yaml
|
||||
post-run: playbooks/python-tarball/post.yaml
|
||||
vars:
|
||||
release_python: python3
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ec49fffbe5f50c1a0babad150a716b72a138fec4
|
||||
Subproject commit 6b1f119db723343040c43d2ccba31d54e39f2207
|
35
playbooks/python-tarball/post.yaml
Normal file
35
playbooks/python-tarball/post.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- 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: "{{ zj_tarball_wheel.path }}"
|
||||
with_items: "{{ result.files }}"
|
||||
loop_control:
|
||||
loop_var: zj_tarball_wheel
|
||||
|
||||
- name: Ensure artifacts directory exists
|
||||
file:
|
||||
path: "{{ zuul.executor.work_root }}/artifacts"
|
||||
state: directory
|
||||
mode: 0755
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Collect artifacts
|
||||
synchronize:
|
||||
dest: "{{ zuul.executor.work_root }}/artifacts/"
|
||||
mode: pull
|
||||
src: "{{ zj_artifact.path }}"
|
||||
verify_host: true
|
||||
owner: no
|
||||
group: no
|
||||
with_items: "{{ result.files }}"
|
||||
loop_control:
|
||||
loop_var: zj_artifact
|
||||
|
@ -17,6 +17,7 @@
|
||||
npm install -g yarn
|
||||
# tox
|
||||
pip3 install tox
|
||||
|
||||
- name: Build tarball and wheel
|
||||
shell:
|
||||
executable: /bin/bash
|
||||
@ -26,15 +27,17 @@
|
||||
$HOME/.local/bin/tox -e package
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
- name: Remove the invalid tar.gz packages
|
||||
|
||||
- name: Remove the invalid tar.gz and whl packages
|
||||
shell:
|
||||
executable: /bin/bash
|
||||
cmd: |
|
||||
rm -rf *.tar.gz
|
||||
rm -rf *
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}/dist"
|
||||
- name: Move all tar.gz packages into dist
|
||||
shell: "mv libs/{{ item }}/dist/*.tar.gz dist/"
|
||||
|
||||
- name: Move all tar.gz and whl packages into dist
|
||||
shell: "mv libs/{{ item }}/dist/* dist/"
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
with_items:
|
||||
@ -44,14 +47,28 @@
|
||||
- "skyline-log"
|
||||
- "skyline-nginx"
|
||||
- "skyline-policy-manager"
|
||||
- name: All tar.gz into skyline.tar.gz
|
||||
shell:
|
||||
executable: /bin/bash
|
||||
cmd: |
|
||||
mkdir -p packages
|
||||
mv *.tar.gz packages
|
||||
mv packages skyline-apiserver
|
||||
tar -czf skyline-apiserver.tar.gz skyline-apiserver
|
||||
rm -rf skyline-apiserver
|
||||
|
||||
- name: Rename whl files to branch specific name
|
||||
shell: "mv {{ item }}*.whl {{ item }}-{{ zuul.branch | replace('/', '-') }}.whl"
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}/dist"
|
||||
with_items:
|
||||
- "skyline_apiserver"
|
||||
- "skyline_config"
|
||||
- "skyline_console"
|
||||
- "skyline_log"
|
||||
- "skyline_nginx"
|
||||
- "skyline_policy_manager"
|
||||
|
||||
- name: Rename tar.gz files to branch specific name
|
||||
shell: "mv {{ item }}*.tar.gz {{ item }}-{{ zuul.branch | replace('/', '-') }}.tar.gz"
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}/dist"
|
||||
with_items:
|
||||
- "skyline-apiserver"
|
||||
- "skyline-config"
|
||||
- "skyline-console"
|
||||
- "skyline-log"
|
||||
- "skyline-nginx"
|
||||
- "skyline-policy-manager"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user