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.
|
Publish the results tar.gz and whl packages to tarballs.openstack.org.
|
||||||
pre-run: playbooks/python-tarball/pre.yaml
|
pre-run: playbooks/python-tarball/pre.yaml
|
||||||
run: playbooks/python-tarball/run.yaml
|
run: playbooks/python-tarball/run.yaml
|
||||||
|
post-run: playbooks/python-tarball/post.yaml
|
||||||
vars:
|
vars:
|
||||||
release_python: python3
|
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
|
npm install -g yarn
|
||||||
# tox
|
# tox
|
||||||
pip3 install tox
|
pip3 install tox
|
||||||
|
|
||||||
- name: Build tarball and wheel
|
- name: Build tarball and wheel
|
||||||
shell:
|
shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
@ -26,15 +27,17 @@
|
|||||||
$HOME/.local/bin/tox -e package
|
$HOME/.local/bin/tox -e package
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||||
- name: Remove the invalid tar.gz packages
|
|
||||||
|
- name: Remove the invalid tar.gz and whl packages
|
||||||
shell:
|
shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
rm -rf *.tar.gz
|
rm -rf *
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}/dist"
|
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:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@ -44,14 +47,28 @@
|
|||||||
- "skyline-log"
|
- "skyline-log"
|
||||||
- "skyline-nginx"
|
- "skyline-nginx"
|
||||||
- "skyline-policy-manager"
|
- "skyline-policy-manager"
|
||||||
- name: All tar.gz into skyline.tar.gz
|
|
||||||
shell:
|
- name: Rename whl files to branch specific name
|
||||||
executable: /bin/bash
|
shell: "mv {{ item }}*.whl {{ item }}-{{ zuul.branch | replace('/', '-') }}.whl"
|
||||||
cmd: |
|
|
||||||
mkdir -p packages
|
|
||||||
mv *.tar.gz packages
|
|
||||||
mv packages skyline-apiserver
|
|
||||||
tar -czf skyline-apiserver.tar.gz skyline-apiserver
|
|
||||||
rm -rf skyline-apiserver
|
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}/dist"
|
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