summaryrefslogtreecommitdiff
path: root/playbooks
diff options
context:
space:
mode:
authorLingxian Kong <anlin.kong@gmail.com>2019-09-16 12:15:34 +1200
committerLingxian Kong <anlin.kong@gmail.com>2019-09-17 22:23:43 +1200
commit0cdf8b20b664abd26bd25483ead82eaf3640a36d (patch)
tree6df17c03ab01676b0505bd1356bc87420130cf46 /playbooks
parentf771e939ebe23a0e0e7da20d87b4256f5e3d2bc1 (diff)
downloadtrove-0cdf8b20b664abd26bd25483ead82eaf3640a36d.tar.gz
Add image build experimental CI job
Story: 2006553 Task: 36637 Change-Id: I3d909082fb887b24ed25c93e11792031d5053b1e
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/image-build/post.yaml12
-rw-r--r--playbooks/image-build/run.yaml19
2 files changed, 31 insertions, 0 deletions
diff --git a/playbooks/image-build/post.yaml b/playbooks/image-build/post.yaml
new file mode 100644
index 00000000..bebd79fb
--- /dev/null
+++ b/playbooks/image-build/post.yaml
@@ -0,0 +1,12 @@
+- hosts: all
+ name: Copy image
+ tasks:
+ - synchronize:
+ src: "{{ ansible_user_dir }}/images"
+ dest: "{{ zuul.executor.work_root }}/artifacts/"
+ mode: pull
+ verify_host: true
+ rsync_opts:
+ - --include="trove-*.qcow2"
+ - --exclude=*
+ - --prune-empty-dirs
diff --git a/playbooks/image-build/run.yaml b/playbooks/image-build/run.yaml
new file mode 100644
index 00000000..6149f8fe
--- /dev/null
+++ b/playbooks/image-build/run.yaml
@@ -0,0 +1,19 @@
+- hosts: all
+ tasks:
+ - name: Ensure artifacts/images directory exists
+ file:
+ path: '{{ ansible_user_dir }}/images'
+ state: directory
+ - name: Build Trove guest image
+ shell: >
+ ./trovestack build-image
+ {{ datastore_type }}
+ {{ guest_os }}
+ {{ guest_os_release }}
+ false
+ {{ guest_username }}
+ {{ ansible_user_dir }}/images/trove-{{ zuul.branch }}-{{ datastore_type }}-{{ guest_os }}-{{ guest_os_release }}.qcow2
+ args:
+ chdir: "{{ ansible_user_dir }}/src/opendev.org/openstack/trove/integration/scripts"
+ tags:
+ - skip_ansible_lint