|
16 | 16 | container_ccache_dir: "/root/.ccache"
|
17 | 17 |
|
18 | 18 | 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 |
| - |
48 | 19 | - name: Clone repository
|
49 | 20 | ansible.builtin.git:
|
50 | 21 | repo: https://github.com/stackrox/collector
|
|
72 | 43 | # state: directory
|
73 | 44 | # when: arch == "s390x"
|
74 | 45 |
|
| 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 | + |
75 | 67 | - name: Build the collector builder image
|
76 | 68 | community.general.make:
|
77 | 69 | chdir: "{{ ansible_env.GITHUB_WORKSPACE | default(collector_root) }}"
|
|
0 commit comments