Fix: Fail to publish package to tarballs
1. Use tox to make packages. 2. Change the way to install nodejs and yarn with nvm. 3. Update the skyline-console submodule Change-Id: I363ec0dcda428701be2260893ebe97aa3dd77b5f
This commit is contained in:
parent
a3518dbf7b
commit
7b61aeee13
@ -1 +1 @@
|
|||||||
Subproject commit 7f273e41c152a3eb1fd95d77cc8ca8442f918783
|
Subproject commit ec49fffbe5f50c1a0babad150a716b72a138fec4
|
@ -1,36 +1,4 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
|
||||||
- name: Install poetry!=1.1.8
|
|
||||||
pip:
|
|
||||||
name: poetry!=1.1.8
|
|
||||||
become: yes
|
|
||||||
- name: Add node repo
|
|
||||||
command: curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -
|
|
||||||
become: yes
|
|
||||||
- name: Install nodejs
|
|
||||||
apt:
|
|
||||||
name: nodejs
|
|
||||||
update_cache: yes
|
|
||||||
become: yes
|
|
||||||
- name: Update nodejs version
|
|
||||||
shell:
|
|
||||||
executable: /bin/bash
|
|
||||||
cmd: |
|
|
||||||
npm install -g n
|
|
||||||
n stable
|
|
||||||
become: yes
|
|
||||||
- name: Add yarn repo
|
|
||||||
shell:
|
|
||||||
executable: /bin/bash
|
|
||||||
cmd: |
|
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
|
||||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
|
||||||
become: yes
|
|
||||||
- name: Install yarn
|
|
||||||
apt:
|
|
||||||
name: yarn
|
|
||||||
update_cache: yes
|
|
||||||
become: yes
|
|
||||||
roles:
|
roles:
|
||||||
# We use ensure-pip to make sure the wheel module is installed
|
# We use ensure-pip to make sure the wheel module is installed
|
||||||
- ensure-pip
|
- ensure-pip
|
||||||
|
@ -1,10 +1,27 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
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
|
- name: Build tarball and wheel
|
||||||
shell:
|
shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
cmd: |
|
cmd: |
|
||||||
make install
|
git submodule update --init
|
||||||
make package
|
$HOME/.local/bin/tox -e package
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||||
|
8
tox.ini
8
tox.ini
@ -1,7 +1,7 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 3.18.0
|
minversion = 3.18.0
|
||||||
# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
|
# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
|
||||||
envlist = unittest-py38,lint,functional
|
envlist = unittest-py38,lint,functional,package
|
||||||
skipsdist=true
|
skipsdist=true
|
||||||
# this allows tox to infer the base python from the environment name
|
# this allows tox to infer the base python from the environment name
|
||||||
# and override any basepython configured in this file
|
# and override any basepython configured in this file
|
||||||
@ -33,3 +33,9 @@ whitelist_externals =
|
|||||||
echo
|
echo
|
||||||
commands =
|
commands =
|
||||||
echo "TODO: Add functional test for skyline-apiserver"
|
echo "TODO: Add functional test for skyline-apiserver"
|
||||||
|
|
||||||
|
[testenv:package]
|
||||||
|
setenv =
|
||||||
|
IGNORE_JS = False
|
||||||
|
commands =
|
||||||
|
make package
|
||||||
|
Loading…
Reference in New Issue
Block a user