Skip to content

Commit

Permalink
populated change in all workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
roiklorin committed Oct 14, 2024
1 parent 6733c5c commit 3f8f7b6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/sonar_single_account_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
branch:
required: true
type: string
additional_tags:
required: true
type: string
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}'

secrets:
AWS_ACCESS_KEY_ID_STAGE:
required: true
Expand All @@ -29,6 +34,11 @@ on:
type: boolean
default: false
required: false
additional_tags:
required: true
type: string
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}'


env:
TF_CLI_ARGS: "-no-color"
Expand All @@ -40,6 +50,7 @@ env:
AWS_REGION: ap-southeast-1
TF_WORKSPACE: sonar_single_account_cli
DESTROY_DELAY_SECONDS: 1800
TF_VAR_additional_tags: ${{ inputs.additional_tags }}

permissions:
contents: read
Expand Down Expand Up @@ -208,7 +219,7 @@ jobs:
envs: REMOTE_EXAMPLE_DIR,TF_WORKSPACE
script: |
printenv
terraform -chdir=$REMOTE_EXAMPLE_DIR plan
terraform -chdir=$REMOTE_EXAMPLE_DIR -var additional_tags='${{ env.TF_VAR_additional_tags }}' plan
- name: Terraform Apply
uses: appleboy/[email protected]
Expand All @@ -219,7 +230,7 @@ jobs:
port: 22
command_timeout: "2h"
envs: REMOTE_EXAMPLE_DIR,TF_WORKSPACE
script: terraform -chdir=$REMOTE_EXAMPLE_DIR apply -auto-approve
script: terraform -chdir=$REMOTE_EXAMPLE_DIR apply -var additional_tags='${{ env.TF_VAR_additional_tags }}' -auto-approve

- name: Terraform Output
if: always()
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/sonar_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
explicit_ref:
required: true
type: string
additional_tags:
required: true
type: string
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}'

secrets:
AWS_ACCESS_KEY_ID:
required: true
Expand All @@ -24,13 +29,20 @@ on:
use_modules_from_terraform_registry:
type: boolean
required: false
additional_tags:
required: true
type: string
default: '{"OwnerEmail": "[email protected]", "ManagerEmail": "[email protected]", "TeamEmail": "[email protected]", "Description": "DSFKit_Tests", "Environment": "Test", "DataClassification": "Internal"}'


env:
TF_CLI_ARGS: "-no-color"
TF_INPUT: 0
TF_VAR_agentless_gw_count: 1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_additional_tags: ${{ inputs.additional_tags }}


permissions:
contents: read
Expand Down Expand Up @@ -64,6 +76,7 @@ jobs:
TF_VAR_hub_hadr: ${{ matrix.hub_hadr }}
TF_VAR_agentless_gw_hadr: ${{ matrix.agentless_gw_hadr }}
TF_VAR_simulation_db_types_for_agentless: ${{ matrix.simulation_db_types_for_agentless }}

environment: test

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
Expand Down Expand Up @@ -281,11 +294,11 @@ jobs:
- name: Terraform Plan for upgrade
run: |
terraform -chdir=$UPGRADE_EXAMPLE_DIR workspace list
terraform -chdir=$UPGRADE_EXAMPLE_DIR plan
terraform -chdir=$UPGRADE_EXAMPLE_DIR plan -var additional_tags='${{ env.TF_VAR_additional_tags }}'
- name: Terraform Apply for upgrade
id: apply_upgrade
run: terraform -chdir=$UPGRADE_EXAMPLE_DIR apply -auto-approve
run: terraform -chdir=$UPGRADE_EXAMPLE_DIR apply -var additional_tags='${{ env.TF_VAR_additional_tags }}' -auto-approve

- name: Terraform Output for upgrade
if: always()
Expand Down

0 comments on commit 3f8f7b6

Please sign in to comment.