Skip to content
Snippets Groups Projects
Commit 2d3bceed authored by Gioacchino Vino's avatar Gioacchino Vino
Browse files

Merge branch 'debug_paas_ci' into 'main'

Attach logs in mail when deployment timeout

See merge request !113
parents 18f7f7d8 c3abac8b
No related branches found
No related tags found
1 merge request!113Attach logs in mail when deployment timeout
......@@ -49,14 +49,32 @@
delay: 60
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: Retrieve depshow from deployment
command: orchent depshow --verbose "{{ deployment.uuid }}"
register: depshow_verbose_output
- name: Save depshow to file
copy:
dest: "{{ paas_ci_workdir }}/depshow_deployment.txt"
content: "{{ depshow_verbose_output.stdout }}"
- name: Retrieve deplog from deployment
command: orchent deplog "{{ deployment.uuid }}"
register: deplog_output
- name: Save deplog to file
copy:
dest: "{{ paas_ci_workdir }}/deplog_deployment.txt"
content: "{{ deplog_output.stdout }}"
- set_fact:
deployment: "{{ depshow_output.stdout|from_json }}"
- name: Get deployment status and outputs (if successful)
assert:
that:
......
......@@ -56,7 +56,8 @@ pipeline {
}
post {
failure {
emailext body: '$DEFAULT_CONTENT', subject: '$PROJECT_NAME - Build # $BUILD_NUMBER: Error during deployment!', to: '$DEFAULT_RECIPIENTS'
archiveArtifacts artifacts: '*deployment.txt', allowEmptyArchive: true
emailext attachmentsPattern: '*deployment.txt', body: '$DEFAULT_CONTENT', subject: '$PROJECT_NAME - Build # $BUILD_NUMBER: Error during deployment!', to: '$DEFAULT_RECIPIENTS'
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment