Merge "feat: Publish source package into tarballs"

This commit is contained in:
Zuul 2021-09-30 09:28:30 +00:00 committed by Gerrit Code Review
commit 63db3fb835
3 changed files with 84 additions and 0 deletions

View File

@ -42,6 +42,16 @@
python_version: 3.8
tox_envlist: lint
- job:
name: publish-skyline-python-branch-tarball
parent: publish-openstack-python-branch-tarball
description: |
Publish the results of the tox-tarball job to tarballs.openstack.org.
run: playbooks/python-tarball/run.yaml
post-run: playbooks/python-tarball/post.yaml
vars:
release_python: python3
- project:
check:
jobs:
@ -53,3 +63,6 @@
- skyline-tox-unittest-py38
- skyline-tox-lint-py38
- skyline-functional-devstack
post:
jobs:
- publish-skyline-python-branch-tarball

View File

@ -0,0 +1,28 @@
- hosts: all
roles:
- fetch-python-sdist-output
pre_tasks:
- name: Rename whl files to branch specific name
shell: "mv {{ item }}.*.whl {{ item }}-{{ zuul.branch | replace('/', '-') }}.whl"
args:
chdir: "src/{{ zuul.project.canonical_name }}/dist"
with_items:
- "skyline"
- "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"
- "skyline-apiserver"
- "skyline-config"
- "skyline-console"
- "skyline-log"
- "skyline-nginx"
- "skyline-policy-manager"

View File

@ -0,0 +1,43 @@
- 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
- name: Build tarball and wheel
shell:
executable: /bin/bash
cmd: |
make install
make package
args:
chdir: "src/{{ zuul.project.canonical_name }}"
become: yes