diff --git a/releasenotes/notes/deployment-status-workflows-7f6ba3b69f805f06.yaml b/releasenotes/notes/deployment-status-workflows-7f6ba3b69f805f06.yaml new file mode 100644 index 000000000..884e34775 --- /dev/null +++ b/releasenotes/notes/deployment-status-workflows-7f6ba3b69f805f06.yaml @@ -0,0 +1,6 @@ +--- +features: + - New workflows are added for manipulating the deployment status, including + tripleo.deployment.v1.set_deployment_status_success, + tripleo.deployment.v1.set_deployment_status_failed, and + tripleo.deployment.v1.set_deployment_status_deploying. diff --git a/workbooks/deployment.yaml b/workbooks/deployment.yaml index 4fe104ec3..f82e327c3 100644 --- a/workbooks/deployment.yaml +++ b/workbooks/deployment.yaml @@ -588,6 +588,111 @@ workflows: payload: deployment_status: <% $.get(deployment_status, "") %> + set_deployment_status_success: + description: > + Set deployment status to success and return the new status + + tags: + - tripleo-common-managed + + input: + - plan: overcloud + - queue_name: tripleo + + output: + deployment_status: <% $.deployment_status %> + + tasks: + + set_deployment_success: + on-success: send_message + publish: + status: SUCCESS + deployment_status: DEPLOY_SUCCESS + + send_message: + workflow: tripleo.messaging.v1.send + input: + queue_name: <% $.queue_name %> + type: <% execution().name %> + status: <% $.status %> + message: <% $.get('message', '') %> + execution: <% execution() %> + plan_name: <% $.plan %> + deployment_status: <% $.deployment_status %> + payload: + deployment_status: <% $.deployment_status %> + + set_deployment_status_failed: + description: > + Set deployment status to failed and return the new status + + tags: + - tripleo-common-managed + + input: + - plan: overcloud + - queue_name: tripleo + + output: + deployment_status: <% $.deployment_status %> + + tasks: + + set_deployment_failed: + on-success: send_message + publish: + status: FAILED + deployment_status: DEPLOY_FAILED + + send_message: + workflow: tripleo.messaging.v1.send + input: + queue_name: <% $.queue_name %> + type: <% execution().name %> + status: <% $.status %> + message: <% $.get('message', '') %> + execution: <% execution() %> + plan_name: <% $.plan %> + deployment_status: <% $.deployment_status %> + payload: + deployment_status: <% $.deployment_status %> + + set_deployment_status_deploying: + description: > + Set deployment status to deploying and return the new status + + tags: + - tripleo-common-managed + + input: + - plan: overcloud + - queue_name: tripleo + + output: + deployment_status: <% $.deployment_status %> + + tasks: + + set_deployment_failed: + on-success: send_message + publish: + status: RUNNING + deployment_status: DEPLOYING + + send_message: + workflow: tripleo.messaging.v1.send + input: + queue_name: <% $.queue_name %> + type: <% execution().name %> + status: <% $.status %> + message: <% $.get('message', '') %> + execution: <% execution() %> + plan_name: <% $.plan %> + deployment_status: <% $.deployment_status %> + payload: + deployment_status: <% $.deployment_status %> + get_deployment_failures: description: > Get deployment failures