Test break on failure #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
# This reusable workflow deploys a multi-node test cluster on a cloud using | ||
# Terraform, then deploys OpenStack via Kayobe. Tempest is then used to test | ||
# the cloud. | ||
name: Multinode | ||
on: | ||
push: | ||
workflow_call: | ||
inputs: | ||
multinode_name: | ||
description: Multinode cluster name | ||
type: string | ||
required: true | ||
multinode_controller_count: | ||
description: Controller count | ||
type: number | ||
default: 3 | ||
multinode_compute_count: | ||
description: Compute count | ||
type: number | ||
default: 2 | ||
multinode_storage_count: | ||
description: Storage count | ||
type: number | ||
default: 3 | ||
os_distribution: | ||
description: Host OS distribution | ||
type: string | ||
default: rocky | ||
os_release: | ||
description: Host OS release | ||
type: string | ||
default: '9' | ||
ssh_username: | ||
description: User for terraform to access the Multinode hosts | ||
type: string | ||
default: cloud-user | ||
neutron_plugin: | ||
description: Neutron ML2 plugin | ||
type: string | ||
default: ovn | ||
stackhpc_kayobe_config_version: | ||
description: stackhpc-kayobe-config version | ||
type: string | ||
required: true | ||
stackhpc_kayobe_config_previous_version: | ||
description: stackhpc-kayobe-config previous version | ||
type: string | ||
terraform_kayobe_multinode_version: | ||
description: terraform-kayobe-multinode version | ||
type: string | ||
default: main | ||
upgrade: | ||
description: Whether to perform an upgrade | ||
type: boolean | ||
default: false | ||
break_on: | ||
# Supported values: 'always', 'never', 'failure', 'success' | ||
description: When to break execution for manual interaction | ||
type: string | ||
default: never | ||
break_duration: | ||
description: How long to break execution for (minutes) | ||
type: number | ||
default: 60 | ||
ssh_key: | ||
description: SSH public key to authorise on Ansible control host | ||
type: string | ||
secrets: | ||
KAYOBE_VAULT_PASSWORD_CI_MULTINODE: | ||
required: true | ||
CLOUDS_YAML: | ||
required: true | ||
OS_APPLICATION_CREDENTIAL_ID: | ||
required: true | ||
OS_APPLICATION_CREDENTIAL_SECRET: | ||
required: true | ||
jobs: | ||
multinode: | ||
name: Multinode | ||
runs-on: arc-skc-aio-runner | ||
environment: Leafcloud | ||
permissions: {} | ||
env: | ||
ANSIBLE_FORCE_COLOR: True | ||
KAYOBE_ENVIRONMENT: ci-multinode | ||
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_MULTINODE }} | ||
break_on: failure | ||
break_duration: 1 | ||
steps: | ||
- name: Break for manual interaction | ||
run: | | ||
Check failure on line 94 in .github/workflows/multinode.yml
|
||
function wait() { | ||
duration=${{ env.break_duration }}m | ||
echo "Breaking on failure for $duration" | ||
sleep $duration | ||
} | ||
if [[ ${{ env.break_on }} =~ '(failure|always)' ]] && [[ ${{ failure() }} = 'true' ]]; then | ||
wait "failure" | ||
elif [[ ${{ env.break_on }} =~ '(success|always)' ]] && [[ ${{ failure() }} = 'false' ]]; then | ||
wait "success" | ||
fi | ||
if: ${{ always() }} |