zuul-jobs/test-playbooks/general/fetch-translation-output.yaml
Ian Wienand 0958588280
ansible-lint: ignore use of mkdir
This isn't very ansible-ish, but let's not worry.  Note noqa tags not
working; see https://github.com/ansible/ansible-lint/issues/2970

Change-Id: Ia8de5b1e16ea7186d6066553cea68aa063807432
2023-02-03 15:06:03 +11:00

39 lines
1.1 KiB
YAML

- hosts: all
pre_tasks:
# Run ensure-output-dirs now as it is not performed speculatively
- name: Run ensure-output-dirs
import_role:
name: ensure-output-dirs
- name: Create fake translation
shell: |
mkdir -p src/{{ zuul.project.canonical_name }}/translation-source/
echo Hello > src/{{ zuul.project.canonical_name }}/translation-source/test
tags:
- skip_ansible_lint
tasks:
- name: Run fetch-translation-output
import_role:
name: fetch-translation-output
- name: Run fetch-output
import_role:
name: fetch-output
when: zuul_use_fetch_output
post_tasks:
- name: Check for artifact on the test instance
stat:
path: "{{ ansible_user_dir }}/zuul-output/artifacts/test"
register: _test_artifact
failed_when: not _test_artifact.stat.exists
when: zuul_use_fetch_output
- name: Check for artifact on the executor
stat:
path: "{{ zuul.executor.work_root }}/artifacts/test"
delegate_to: localhost
register: _executor_artifact
failed_when: not _executor_artifact.stat.exists