Newer
Older
get_url:
url: "{{ paas_ci_test.template_url }}"
dest: "{{ paas_ci_workdir + '/template.yaml' }}"
depcreate_cmd: "orchent depcreate --ojson template.yaml -g {{ paas_ci_iam_group }} {{ paas_ci_test.inputs }}"
- name: Create the deployment
command: "{{ depcreate_cmd }}"
args:
chdir: "{{ paas_ci_workdir }}"
register: depcreate_output
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- set_fact:
deployment: "{{ depcreate_output.stdout|from_json }}"
- debug:
var: deployment
- name: Sleep for 60 seconds and timeout
wait_for:
delay: 60
timeout: 0
- name: Check the deployment status (every 5 mins)
command: orchent depshow --ojson "{{ deployment.uuid }}"
register: depshow_output
until: "'PROGRESS' not in depshow_output.stdout"
retries: 10
delay: 300
failed_when: "'error' in depshow_output.stdout"
- set_fact:
deployment: "{{ depshow_output.stdout|from_json }}"
- name: Save result to file
copy:
dest: "{{ paas_ci_workdir }}/dep.json"
content: "{{ depshow_output.stdout }}"
- name: Get deployment status and outputs (if successful)
assert:
that:
- deployment.status == 'CREATE_COMPLETE'
fail_msg: "TEST FAILED - deployment uuid: {{ deployment.uuid }}, status: {{ deployment.status }}"
success_msg: "TEST PASSED - deployment uuid: {{ deployment.uuid }}, status: {{ deployment.status }}, outputs: {{ deployment.outputs }}"