generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from bcgov/chore/misc
chore: remove destroy from pr close to avoid accidents and add environment tag to the job in deployer
- Loading branch information
Showing
3 changed files
with
52 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: .Terraform Destroyer | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
### Required | ||
environment_name: | ||
description: 'The name of the environment to destroy resources from dev or test or prod(BE CAREFUL HERE)' | ||
required: true | ||
default: 'dev' | ||
type: string | ||
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' | ||
jobs: | ||
cleanup-aws-database: | ||
name: Cleanup AWS Database | ||
uses: ./.github/workflows/.deployer.yml | ||
with: | ||
environment_name: ${{ inputs.environment_name}} | ||
command: destroy | ||
working_directory: database | ||
|
||
secrets: inherit | ||
cleanup-aws-api: | ||
name: Cleanup AWS API | ||
uses: ./.github/workflows/.deployer.yml | ||
with: | ||
environment_name: ${{ inputs.environment_name}} | ||
command: destroy | ||
working_directory: api | ||
app_env: ${{ inputs.app_env}} | ||
secrets: inherit | ||
cleanup-aws-cf: | ||
name: Cleanup AWS CF | ||
uses: ./.github/workflows/.deployer.yml | ||
with: | ||
environment_name: ${{ inputs.environment_name}} | ||
command: destroy | ||
working_directory: frontend | ||
app_env: ${{ inputs.app_env}} | ||
secrets: inherit |
This file contains 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