]> git.immae.eu Git - github/fretlink/ansible-clever.git/blob - tests/test-noop-deploy.yml
Bump clever waiting time to 1 hour
[github/fretlink/ansible-clever.git] / tests / test-noop-deploy.yml
1 ---
2 - name: Do nothing if the app is up-to-date on clever
3 hosts: localhost
4 remote_user: root
5 pre_tasks:
6 - file:
7 state: absent
8 path: ../clever-commands
9 roles:
10 - role: clever
11 vars:
12 clever_token: 123abc
13 clever_secret: cba321
14 clever_app: app_00000000-0000-0000-0000-000000000000
15 environment:
16 PRETEND_REMOTE_COMMIT: aaa000aaa000aaa000aaa000aaa000aaa000aaa0
17 post_tasks:
18 - name: Check stubbed commands
19 shell: "{{ item.cmd }}"
20 ignore_errors: true
21 with_list:
22 - cmd: "! grep deploy ../clever-commands"
23 display: "Expected 'clever deploy' command to NOT be called"
24 vars:
25 display: "{{ item.display }}"
26 register: tests_results
27 - name: show results
28 debug:
29 msg:
30 - "failed_results: {{ failed_results }}"
31 - "success_results: {{ success_results }}"
32 failed_when: tests_results is failed
33 vars:
34 failed_results: "{{ tests_results.results | selectattr('failed') | map(attribute='item.display') | list }}"
35 success_results: "{{ tests_results.results | rejectattr('failed') | map(attribute='item.display') | list }}"