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
|
||||
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:
|
||||
# We use ensure-pip to make sure the wheel module is installed
|
||||
- ensure-pip
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
- 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: |
|
||||
make install
|
||||
make package
|
||||
git submodule update --init
|
||||
$HOME/.local/bin/tox -e package
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
|
8
tox.ini
8
tox.ini
|
@ -1,7 +1,7 @@
|
|||
[tox]
|
||||
minversion = 3.18.0
|
||||
# python runtimes: https://governance.openstack.org/tc/reference/runtimes/ussuri.html
|
||||
envlist = unittest-py38,lint,functional
|
||||
envlist = unittest-py38,lint,functional,package
|
||||
skipsdist=true
|
||||
# this allows tox to infer the base python from the environment name
|
||||
# and override any basepython configured in this file
|
||||
|
@ -33,3 +33,9 @@ whitelist_externals =
|
|||
echo
|
||||
commands =
|
||||
echo "TODO: Add functional test for skyline-apiserver"
|
||||
|
||||
[testenv:package]
|
||||
setenv =
|
||||
IGNORE_JS = False
|
||||
commands =
|
||||
make package
|
||||
|
|
Loading…
Reference in New Issue