Fix: Add pre.yaml in publish job
The default pre.yaml will revoke the sudo. So we install the extra tools before we revoke the sudo. Change-Id: Ie4ae0dc8ee90e6ea79f2b463988c32aa4ddaadba
This commit is contained in:
parent
63db3fb835
commit
46b5fcad23
@ -47,6 +47,7 @@
|
|||||||
parent: publish-openstack-python-branch-tarball
|
parent: publish-openstack-python-branch-tarball
|
||||||
description: |
|
description: |
|
||||||
Publish the results of the tox-tarball job to tarballs.openstack.org.
|
Publish the results of the tox-tarball job to tarballs.openstack.org.
|
||||||
|
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
|
post-run: playbooks/python-tarball/post.yaml
|
||||||
vars:
|
vars:
|
||||||
|
37
playbooks/python-tarball/pre.yaml
Normal file
37
playbooks/python-tarball/pre.yaml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
- 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
|
||||||
|
- revoke-sudo
|
@ -1,37 +1,5 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
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
|
|
||||||
|
|
||||||
- name: Build tarball and wheel
|
- name: Build tarball and wheel
|
||||||
shell:
|
shell:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
@ -40,4 +8,3 @@
|
|||||||
make package
|
make package
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||||
become: yes
|
|
Loading…
Reference in New Issue
Block a user