diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..68407a0 --- /dev/null +++ b/.zuul.yaml @@ -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 diff --git a/playbooks/build-artifacts/post.yaml b/playbooks/build-artifacts/post.yaml new file mode 100644 index 0000000..a424537 --- /dev/null +++ b/playbooks/build-artifacts/post.yaml @@ -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 diff --git a/playbooks/build-artifacts/run.yaml b/playbooks/build-artifacts/run.yaml new file mode 100644 index 0000000..ac80886 --- /dev/null +++ b/playbooks/build-artifacts/run.yaml @@ -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 }}'