Skip to content

Commit 6bb2700

Browse files
committed
dbg
1 parent 0887d1d commit 6bb2700

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

ansible/ci-build-builder.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@
1616
container_ccache_dir: "/root/.ccache"
1717

1818
tasks:
19+
- name: Check if remote ccache archive exists on controller
20+
delegate_to: localhost
21+
ansible.builtin.stat:
22+
path: "{{ github_workspace }}/{{ ccache_path }}"
23+
register: ccache_check
24+
when: arch == "s390x"
25+
26+
- name: Copy ccache from the controller to build VM
27+
delegate_to: localhost
28+
ansible.builtin.copy:
29+
src: "{{ github_workspace }}/{{ ccache_path }}"
30+
dest: "{{ collector_root }}/{{ ccache_dir }}/"
31+
when: arch == "s390x" and ccache_check.stat.exists
32+
become: true
33+
34+
- name: Create a remote ccache directory if it does not exist
35+
ansible.builtin.file:
36+
path: "{{ collector_root }}/{{ ccache_dir }}"
37+
state: directory
38+
mode: '0777'
39+
when: arch == "s390x"
40+
41+
42+
- name: Inject docker cache manually
43+
ansible.builtin.shell:
44+
cmd: ansible/scripts/inject_docker_cache.sh "{{ collector_root }}/{{ ccache_dir }}" "{{ container_ccache_dir }}"
45+
chdir: "{{ collector_root }}"
46+
when: arch == "s390x" and ccache_check.stat.exists
47+
1948
- name: Clone repository
2049
ansible.builtin.git:
2150
repo: https://github.com/stackrox/collector
@@ -43,27 +72,6 @@
4372
# state: directory
4473
# when: arch == "s390x"
4574

46-
- name: Check if remote ccache archive exists on controller
47-
delegate_to: localhost
48-
ansible.builtin.stat:
49-
path: "{{ github_workspace }}/{{ ccache_path }}"
50-
register: ccache_check
51-
when: arch == "s390x"
52-
53-
- name: Copy ccache from the controller to build VM
54-
delegate_to: localhost
55-
ansible.builtin.copy:
56-
src: "{{ github_workspace }}/{{ ccache_path }}"
57-
dest: "{{ collector_root }}/{{ ccache_dir }}/"
58-
when: arch == "s390x" and ccache_check.stat.exists
59-
become: true
60-
61-
- name: Inject docker cache manually
62-
ansible.builtin.shell:
63-
cmd: ansible/scripts/inject_docker_cache.sh "{{ collector_root }}/{{ ccache_dir }}" "{{ container_ccache_dir }}"
64-
chdir: "{{ collector_root }}"
65-
when: arch == "s390x" and ccache_check.stat.exists
66-
6775
- name: Build the collector builder image
6876
community.general.make:
6977
chdir: "{{ ansible_env.GITHUB_WORKSPACE | default(collector_root) }}"

0 commit comments

Comments
 (0)