From efc1222834abf78d9cc5e4ac8274ad1fa753d121 Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Mon, 8 Oct 2018 15:40:43 +0200 Subject: [PATCH] DNM: debug --- playbooks/clean-static-node.yaml | 6 ++++++ playbooks/debug-info.yaml | 35 ++++++++++++++++++++++++++++++++ zuul.d/jobs.yaml | 2 +- zuul.d/nodesets.yaml | 6 ++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 playbooks/debug-info.yaml diff --git a/playbooks/clean-static-node.yaml b/playbooks/clean-static-node.yaml index f66b4cc..7d7a6d7 100644 --- a/playbooks/clean-static-node.yaml +++ b/playbooks/clean-static-node.yaml @@ -6,3 +6,9 @@ args: chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" removes: "awx.egg-info" + ignore_errors: yes + + - name: Remove old project directory + file: + path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + state: absent diff --git a/playbooks/debug-info.yaml b/playbooks/debug-info.yaml new file mode 100644 index 0000000..b6a3a24 --- /dev/null +++ b/playbooks/debug-info.yaml @@ -0,0 +1,35 @@ +--- +- hosts: all + tasks: + - name: Show HEAD + shell: git rev-parse HEAD + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + + - name: Add remote + shell: git remote add temp https://{{ zuul.project.canonical_name }} + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + + - name: Show Remote + shell: git remote -v + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + + - name: test + shell: git fetch temp pull/{{ zuul.change }}/head:{{ zuul.change }} && git checkout {{ zuul.change }} + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + ignore_errors: yes + + + - name: Show last commit + shell: git log -1 --oneline | cat + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + ignore_errors: yes + + - name: List files + shell: ls -lR + args: + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 552f6a3..238eb64 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -1,7 +1,7 @@ - job: name: tox-awx parent: tox - pre-run: playbooks/clean-static-node.yaml + pre-run: playbooks/debug-info.yaml nodeset: static-node abstract: true diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml index ef9f20c..c963267 100644 --- a/zuul.d/nodesets.yaml +++ b/zuul.d/nodesets.yaml @@ -3,3 +3,9 @@ nodes: - name: static label: static-ansible + +- nodeset: + name: fedora-latest-1vcpu + nodes: + - name: fedora-28 + label: ansible-fedora-28-1vcpu