From db33049bd527c418591a09baac24eba2f6fada88 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 7 Dec 2021 10:45:45 +1100 Subject: [PATCH] Add .gitreview and basic Zuul job Change-Id: I9637e20984b64297e5c7306ffe031d618f0c260f --- .gitreview | 4 ++++ .zuul.yaml | 13 +++++++++++++ playbooks/test.yaml | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 .gitreview create mode 100644 .zuul.yaml create mode 100644 playbooks/test.yaml diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..ada8aa0 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.opendev.org +port=29418 +project=opendev/dstat_graph.git diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..c8ecd71 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,13 @@ +- job: + name: dstat_graph-generate-graph + description: | + Test dstat_graph generation + run: playbooks/test.yaml + +- project: + check: + jobs: + - dstat_graph-generate-graph + gate: + jobs: + - dstat_graph-generate-graph diff --git a/playbooks/test.yaml b/playbooks/test.yaml new file mode 100644 index 0000000..04e50b0 --- /dev/null +++ b/playbooks/test.yaml @@ -0,0 +1,24 @@ +- hosts: all + tasks: + + - name: Run build + shell: | + ./generate_page.sh sample.csv > dstat_graph.html + args: + chdir: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}' + + - name: Copy to executor + synchronize: + src: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/dstat_graph.html' + dest: '{{ zuul.executor.log_root }}' + mode: pull + + - name: Return artifact to Zuul + zuul_return: + data: + zuul: + artifacts: + - name: 'Sample dstat graphs' + url: 'dstat_graph.html' + metadata: + type: text/html