From 6a9f9239331568a727f55aaee248d6764f8e3557 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Wed, 27 Jun 2018 14:38:07 -0400 Subject: [PATCH] Workflows for manipulating deployment status Adds new workflows for setting the deployment status to either success, failed, or deploying. These are useful when interacting with the deployment manually, such as manually running config-download. Change-Id: Ibbe1e9a6776b16078c88b9b2111bf7b774a50161 --- ...ent-status-workflows-7f6ba3b69f805f06.yaml | 6 + workbooks/deployment.yaml | 105 ++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 releasenotes/notes/deployment-status-workflows-7f6ba3b69f805f06.yaml 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