zhu.boxiang 7a78dac501 feat: Publish skyline-console to opendev tarballs
1. add tox.ini file
2. add playbooks for python tarball
3. add publish-skyline-console-python-branch-tarball job

Change-Id: I12124e65ffd67f18442bb4ff9ffb398c0d65114c
2021-12-24 14:06:32 +08:00

39 lines
1.3 KiB
YAML

- hosts: all
tasks:
- name: Install tox, nvm, nodejs and yarn
shell:
executable: /bin/bash
cmd: |
# nvm
wget -P $HOME --tries=10 --retry-connrefused --waitretry=60 --no-dns-cache --no-cache https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh
bash $HOME/install.sh
. $HOME/.nvm/nvm.sh
# nodejs
NODE_VERSION=erbium
nvm install --lts=$NODE_VERSION
nvm alias default lts/$NODE_VERSION
nvm use default
# yarn
npm install -g yarn
# tox
pip3 install tox
- name: Build tarball and wheel
shell:
executable: /bin/bash
cmd: |
. $HOME/.nvm/nvm.sh
$HOME/.local/bin/tox -e package
args:
chdir: "src/{{ zuul.project.canonical_name }}"
- name: Rename whl files to branch specific name
shell: "mv skyline_console*.whl skyline_console-{{ zuul.branch | replace('/', '-') }}.whl"
args:
chdir: "src/{{ zuul.project.canonical_name }}/dist"
- name: Rename tar.gz files to branch specific name
shell: "mv skyline-console*.tar.gz skyline-console-{{ zuul.branch | replace('/', '-') }}.tar.gz"
args:
chdir: "src/{{ zuul.project.canonical_name }}/dist"