Skip to content

Commit 205e5cd

Browse files
Fix/link after refactor (#630)
Fix/link after refactor Fix the inclusion of task files from within the roles and playbooks Run the Testing Farm from the PR Reviewed-by: Laura Barcziová
2 parents 1896da5 + 0e47807 commit 205e5cd

File tree

10 files changed

+34
-26
lines changed

10 files changed

+34
-26
lines changed

.github/workflows/tf-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
compose: CentOS-Stream-9
1818
api_key: ${{ secrets.TF_API_KEY }}
1919
git_url: "https://github.com/packit/deployment"
20-
git_ref: "tf-openshift-tests"
20+
git_ref: ${{ github.event.pull_request.head.sha }}
2121
tmt_plan_regex: "deployment/remote"
2222
tmt_hardware: '{"memory": ">= 13 GiB", "disk": [{"size": ">= 100 GB"}], "cpu": {"cores": ">= 6"}, "virtualization": {"is-supported": true}}'
2323
pull_request_status_name: "Deployment"

playbooks/tasks

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../tasks
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/check-pod-running.yml
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/check-up-to-date.yml

roles/deploy/tasks/k8s.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/k8s.yml

roles/deploy/tasks/main.yml

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
- name: Include tasks/project-dir.yml
3-
ansible.builtin.include_tasks: tasks/project-dir.yml
2+
- name: Include project-dir.yml
3+
ansible.builtin.include_tasks: project-dir.yml
44
tags:
55
- always
66

@@ -9,18 +9,18 @@
99
tags:
1010
- always
1111

12-
- name: Include tasks/check-up-to-date.yml
13-
ansible.builtin.include_tasks: tasks/check-up-to-date.yml
12+
- name: Include check-up-to-date.yml
13+
ansible.builtin.include_tasks: check-up-to-date.yml
1414
tags:
1515
- always
1616

1717
- name: Include deployment facts
18-
ansible.builtin.include_tasks: tasks/set-deployment-facts.yml
18+
ansible.builtin.include_tasks: set-deployment-facts.yml
1919
tags:
2020
- always
2121

22-
- name: Include tasks/set-facts.yml
23-
ansible.builtin.include_tasks: tasks/set-facts.yml
22+
- name: Include set-facts.yml
23+
ansible.builtin.include_tasks: set-facts.yml
2424
tags:
2525
- always
2626

@@ -106,7 +106,7 @@
106106
changed_when: true
107107

108108
- name: Deploy secrets
109-
ansible.builtin.include_tasks: tasks/k8s.yml
109+
ansible.builtin.include_tasks: k8s.yml
110110
loop:
111111
- "{{ lookup('template', '{{ project_dir }}/openshift/secret-packit-ssh.yml.j2') }}"
112112
- "{{ lookup('template', '{{ project_dir }}/openshift/secret-packit-secrets.yml.j2') }}"
@@ -135,14 +135,14 @@
135135
changed_when: "'added:' in rolebinding.stdout"
136136

137137
- name: Deploy postgres
138-
ansible.builtin.include_tasks: tasks/k8s.yml
138+
ansible.builtin.include_tasks: k8s.yml
139139
loop:
140140
- "{{ lookup('template', '{{ project_dir }}/openshift/postgres.yml.j2') }}"
141141
tags:
142142
- postgres
143143

144144
- name: Deploy key-value database ({{ kv_database }})
145-
ansible.builtin.include_tasks: tasks/k8s.yml
145+
ansible.builtin.include_tasks: k8s.yml
146146
loop:
147147
- "{{ lookup('file', '{{ project_dir }}/openshift/configmap-redis_like_config.yml') }}"
148148
- "{{ lookup('template', '{{ project_dir }}/openshift/{{ kv_database }}.yml.j2') }}"
@@ -151,7 +151,7 @@
151151
- kv_database
152152

153153
- name: Deploy fluentd image stream and config
154-
ansible.builtin.include_tasks: tasks/k8s.yml
154+
ansible.builtin.include_tasks: k8s.yml
155155
loop:
156156
- "{{ lookup('template', '{{ project_dir }}/openshift/fluentd.yml.j2') }}"
157157
tags:
@@ -160,7 +160,7 @@
160160
when: with_fluentd_sidecar
161161

162162
- name: Deploy packit-service
163-
ansible.builtin.include_tasks: tasks/k8s.yml
163+
ansible.builtin.include_tasks: k8s.yml
164164
loop:
165165
- "{{ lookup('template', '{{ project_dir }}/openshift/packit-service.yml.j2') }}"
166166
tags:
@@ -189,7 +189,7 @@
189189
worker_requests_cpu: "100m"
190190
worker_limits_memory: "1024Mi"
191191
worker_limits_cpu: "400m"
192-
ansible.builtin.include_tasks: tasks/k8s.yml
192+
ansible.builtin.include_tasks: k8s.yml
193193
loop:
194194
- "{{ lookup('template', '{{ project_dir }}/openshift/packit-worker.yml.j2') }}"
195195
tags:
@@ -207,7 +207,7 @@
207207
worker_requests_cpu: "80m"
208208
worker_limits_memory: "640Mi"
209209
worker_limits_cpu: "700m"
210-
ansible.builtin.include_tasks: tasks/k8s.yml
210+
ansible.builtin.include_tasks: k8s.yml
211211
loop:
212212
- "{{ lookup('template', '{{ project_dir }}/openshift/packit-worker.yml.j2') }}"
213213
tags:
@@ -239,23 +239,23 @@
239239
worker_requests_cpu: "100m"
240240
worker_limits_memory: "2048Mi"
241241
worker_limits_cpu: "600m"
242-
ansible.builtin.include_tasks: tasks/k8s.yml
242+
ansible.builtin.include_tasks: k8s.yml
243243
loop:
244244
- "{{ lookup('template', '{{ project_dir }}/openshift/packit-worker.yml.j2') }}"
245245
tags:
246246
- packit-worker
247247
when: workers_long_running > 0
248248

249249
- name: Deploy packit-service-beat
250-
ansible.builtin.include_tasks: tasks/k8s.yml
250+
ansible.builtin.include_tasks: k8s.yml
251251
loop:
252252
- "{{ lookup('template', '{{ project_dir }}/openshift/packit-service-beat.yml.j2') }}"
253253
when: with_beat
254254
tags:
255255
- packit-service-beat
256256

257257
- name: Deploy dashboard
258-
ansible.builtin.include_tasks: tasks/k8s.yml
258+
ansible.builtin.include_tasks: k8s.yml
259259
loop:
260260
- "{{ lookup('template', '{{ project_dir }}/openshift/dashboard.yml.j2') }}"
261261
when: with_dashboard
@@ -279,7 +279,7 @@
279279
- name: Deploy redis-commander
280280
vars:
281281
k8s_apply: true
282-
ansible.builtin.include_tasks: tasks/k8s.yml
282+
ansible.builtin.include_tasks: k8s.yml
283283
loop:
284284
- "{{ lookup('template', '{{ project_dir }}/openshift/redis-commander.yml.j2') }}"
285285
when: with_redis_commander
@@ -288,15 +288,15 @@
288288
register: redis_commander
289289

290290
- name: Deploy flower
291-
ansible.builtin.include_tasks: tasks/k8s.yml
291+
ansible.builtin.include_tasks: k8s.yml
292292
loop:
293293
- "{{ lookup('template', '{{ project_dir }}/openshift/flower.yml.j2') }}"
294294
when: with_flower
295295
tags:
296296
- flower
297297

298298
- name: Deploy packit-service-fedmsg
299-
ansible.builtin.include_tasks: tasks/k8s.yml
299+
ansible.builtin.include_tasks: k8s.yml
300300
loop:
301301
- "{{ lookup('template', '{{ project_dir }}/openshift/packit-service-fedmsg.yml.j2') }}"
302302
tags:
@@ -329,7 +329,7 @@
329329
when: with_tokman
330330

331331
- name: Deploy aggregating pushgateway
332-
ansible.builtin.include_tasks: tasks/k8s.yml
332+
ansible.builtin.include_tasks: k8s.yml
333333
loop:
334334
- "{{ lookup('template', '{{ project_dir }}/openshift/pushgateway.yml.j2') }}"
335335
tags:
@@ -348,7 +348,7 @@
348348
password: "{{ vault.flower.basic_auth | regex_replace('flower-boss:', '') }}"
349349
mode: 0640
350350
- name: Deploy flower-htpasswd secret
351-
# Don't use tasks/k8s.yml here because the loop item is always evaluated
351+
# Don't use k8s.yml here because the loop item is always evaluated
352352
k8s:
353353
namespace: "{{ project }}"
354354
resource_definition: "{{ lookup('template', '{{ project_dir }}/openshift/secret-flower-htpasswd.yml.j2') }}"
@@ -373,19 +373,19 @@
373373
- name: Wait for worker-0 to be running
374374
vars:
375375
pod_name: packit-worker-0
376-
ansible.builtin.include_tasks: tasks/wait_for_pod.yml
376+
ansible.builtin.include_tasks: wait_for_pod.yml
377377
when: workers_all_tasks > 0
378378

379379
- name: Wait for worker-short-running-0 to be running
380380
vars:
381381
pod_name: packit-worker-short-running-0
382-
ansible.builtin.include_tasks: tasks/wait_for_pod.yml
382+
ansible.builtin.include_tasks: wait_for_pod.yml
383383
when: workers_short_running > 0
384384

385385
- name: Wait for worker-long-running-0 to be running
386386
vars:
387387
pod_name: packit-worker-long-running-0
388-
ansible.builtin.include_tasks: tasks/wait_for_pod.yml
388+
ansible.builtin.include_tasks: wait_for_pod.yml
389389
when: workers_long_running > 0
390390

391391
- name: Select project to check status on command line

roles/deploy/tasks/project-dir.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/project-dir.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/set-deployment-facts.yml

roles/deploy/tasks/set-facts.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/set-facts.yml

roles/deploy/tasks/wait_for_pod.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../tasks/wait_for_pod.yml

0 commit comments

Comments
 (0)