Merge "Workflows for manipulating deployment status"

This commit is contained in:
Zuul 2018-07-05 10:54:42 +00:00 committed by Gerrit Code Review
commit 3d7779afd7
2 changed files with 111 additions and 0 deletions

View File

@ -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.

View File

@ -641,6 +641,111 @@ workflows:
payload: payload:
deployment_status: <% $.get(deployment_status, "") %> 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: get_deployment_failures:
description: > description: >
Get deployment failures Get deployment failures