Add native Zuul v3 build and publishing jobs

The new jobs replace (and move in-tree):
- legacy-sahara-extra-artifacts
- legacy-post-sahara-extra-artifacts

Unfortunately the new publish job can't be tested
beforehand, but we can fix it later.

Story: 2001686
Task: 8660

Depends-On: https://review.openstack.org/581087
Change-Id: I5b1ad485dfb23ce164473569b6bbc77fb37871ac
This commit is contained in:
Luigi Toscano 2018-07-09 20:03:59 +02:00
parent c091d778b6
commit 90c2430bc9
3 changed files with 53 additions and 0 deletions

33
.zuul.yaml Normal file
View File

@ -0,0 +1,33 @@
- project:
check:
jobs:
- sahara-extra-build-artifacts
gate:
jobs:
- sahara-extra-build-artifacts
post:
jobs:
- sahara-extra-publish-artifacts
- job:
name: sahara-extra-build-artifacts
description: |
Build the artifacts used by Sahara clusters and jobs.
parent: unittests
timeout: 3600
required-projects:
- openstack/sahara-extra
run: playbooks/build-artifacts/run.yaml
- job:
name: sahara-extra-publish-artifacts
description: |
Build the artifacts used by Sahara clusters and jobs
and publish them on tarballs.openstack.org
parent: publish-openstack-artifacts
timeout: 3600
final: true
required-projects:
- openstack/sahara-extra
run: playbooks/build-artifacts/run.yaml
post-run: playbooks/build-artifacts/post.yaml

View File

@ -0,0 +1,14 @@
- hosts: all
name: Copy artifacts
tasks:
- synchronize:
dest: "{{ zuul.executor.work_root }}/artifacts/"
mode: pull
src: "{{ ansible_user_dir }}/dist"
copy_links: true
verify_host: true
rsync_opts:
- --include=/dist/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -0,0 +1,6 @@
- hosts: all
tasks:
- name: Run tools/build-all-artifacts.sh
command: bash -xe tools/build-all-artifacts.sh '{{ zuul.branch }}'
args:
chdir: '{{ zuul.project.src_dir }}'