generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (65 loc) · 1.94 KB
/
.destroy_stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: .Destroy Stack
on:
workflow_call:
inputs:
### Required
environment_name:
description: 'The name of the environment to deploy to'
required: true
default: 'dev'
type: string
command:
description: 'The terragrunt command to run'
default: 'destroy'
required: false
type: string
tag:
description: 'The tag of the containers to deploy'
default: 'latest'
type: string
required: false
app_env:
required: false
type: string
description: 'The APP env separates between AWS ENV and Actual APP, since AWS dev is where PR, and TEST is deployed'
env:
AWS_REGION: ca-central-1
jobs:
stack-prefix:
name: Stack Prefix
uses: ./.github/workflows/.stack-prefix.yml
api:
name: Destroy API
needs: [stack-prefix]
uses: ./.github/workflows/.deployer.yml
with:
environment_name: ${{ inputs.environment_name }}
command: ${{ inputs.command }}
tag: ${{ inputs.tag }}
app_env: ${{ inputs.app_env }}
working_directory: api
stack_prefix: ${{ needs.stack-prefix.outputs.stack_prefix }}
secrets: inherit
db:
name: Destroy Database
needs: [stack-prefix, api]
uses: ./.github/workflows/.deployer.yml
with:
environment_name: ${{ inputs.environment_name }}
command: ${{ inputs.command }}
working_directory: database
app_env: ${{ inputs.app_env }}
stack_prefix: ${{ needs.stack-prefix.outputs.stack_prefix }}
secrets: inherit
cloudfront:
name: Destroy Cloudfront
needs: [stack-prefix]
uses: ./.github/workflows/.deployer.yml
with:
environment_name: ${{ inputs.environment_name }}
command: ${{ inputs.command }}
tag: ${{ inputs.tag }}
app_env: ${{ inputs.app_env }}
working_directory: frontend
stack_prefix: ${{ needs.stack-prefix.outputs.stack_prefix }}
secrets: inherit