aboutsummaryrefslogtreecommitdiffstats
path: root/roles/xtesting-pages/tasks/main.yaml
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2022-10-19 17:49:04 +0200
committerAndreas Geissler <andreas-geissler@telekom.de>2022-10-19 17:52:13 +0200
commitd273edeccd97122de1caec74243d702a652cacb9 (patch)
tree4414e752f4a6aebc6fa29ef79b36d9b5f5571858 /roles/xtesting-pages/tasks/main.yaml
parented3c78887493baa5855ac5256683b68ab7b74073 (diff)
[GITLAB] Initial content for gitlab project xtesting-onap
Issue-ID: INT-2150 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de> Change-Id: I6a429e2f661474fe54b13b6513eca64f13e99b50
Diffstat (limited to 'roles/xtesting-pages/tasks/main.yaml')
-rw-r--r--roles/xtesting-pages/tasks/main.yaml69
1 files changed, 69 insertions, 0 deletions
diff --git a/roles/xtesting-pages/tasks/main.yaml b/roles/xtesting-pages/tasks/main.yaml
new file mode 100644
index 0000000..e9fe0d0
--- /dev/null
+++ b/roles/xtesting-pages/tasks/main.yaml
@@ -0,0 +1,69 @@
+---
+- name: install pip dependencies
+ become: "yes"
+ ansible.builtin.pip:
+ name: "{{ item }}"
+ state: latest
+ loop: "{{ pip_packages_pages }}"
+
+- name: Copy template dir to Jumphost to generate pages
+ ansible.builtin.copy:
+ src: "{{ doc_path }}/template"
+ dest: "{{ doc_dir_target }}/{{ doc_path }}"
+
+- name: Copy dashboard page generator to Jumphost
+ ansible.builtin.copy:
+ src: "{{ doc_path }}/generate_status.py"
+ dest: "{{ doc_dir_target }}/{{ doc_path }}"
+
+- name: "[LEGACY] Generate pages"
+ shell: "python3 generate_status.py -p {{ node_name }} -d {{ test_result_url }} -t {{ build_tag }} -m legacy"
+ args:
+ chdir: "{{ doc_dir_target }}/{{ doc_path }}"
+ when: not use_s3 | bool
+
+- name: "[S3] Generate pages"
+ shell: "python3 generate_status.py -p {{ node_name }} -d {{ test_result_url }} -t {{ build_tag }} -m s3"
+ args:
+ chdir: "{{ doc_dir_target }}/{{ doc_path }}"
+ when: use_s3 | bool
+ register: page_generation
+
+- name: Manage additional status pages
+ block:
+ - name: Copy stability page generator to Jumphost
+ ansible.builtin.copy:
+ src: "{{ doc_path }}/generate_stability_graphs.py"
+ dest: "{{ doc_dir_target }}/{{ doc_path }}"
+
+ - name: Copy docker version page generator to Jumphost
+ ansible.builtin.copy:
+ src: "{{ doc_path }}/generate_docker_version.py"
+ dest: "{{ doc_dir_target }}/{{ doc_path }}"
+
+ - name: "Generate stability page"
+ shell: "python3 generate_stability_graphs.py -v {{ onap_version }}"
+ args:
+ chdir: "{{ doc_dir_target }}/{{ doc_path }}"
+
+ - name: "Generate docker version page"
+ shell: "python3 generate_docker_version.py"
+ args:
+ chdir: "{{ doc_dir_target }}/{{ doc_path }}"
+ when: '"daily" in pod'
+ ignore_errors: yes
+
+- name: Fetch pages
+ ansible.posix.synchronize:
+ src: "{{ doc_dir_target }}/{{ doc_path }}/*"
+ dest: "{{ doc_path }}"
+ use_ssh_args: true
+ mode: pull
+ recursive: no
+ rsync_opts:
+ - "--exclude=*.py"
+
+- name: Delete remote doc dir
+ ansible.builtin.file:
+ path: "{{ doc_dir_target }}/{{ doc_path }}"
+ state: absent