Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eytannnaim committed Oct 19, 2023
1 parent 82cd3d5 commit 8aab090
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/sonar_poc_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ on:
- 'modules/null/hadr/*'
- 'examples/poc/sonar_basic_deployment/*'
- 'examples/poc/sonar_hadr_deployment/*'
- 'examples/azure/dsf_deployment/*'

pull_request:
types:
Expand All @@ -59,14 +60,18 @@ on:
- 'modules/null/hadr/*'
- 'examples/poc/sonar_basic_deployment/*'
- 'examples/poc/sonar_hadr_deployment/*'
- 'examples/azure/dsf_deployment/*'

env:
TF_CLI_ARGS: "-no-color"
TF_INPUT: 0
TF_VAR_gw_count: 1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

ARM_SUBSCRIPTION_ID: ${{ vars.ARM_SUBSCRIPTION_ID }}
ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }}
ARM_TENANT_ID: ${{ vars.ARM_TENANT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
permissions:
contents: read

Expand All @@ -76,23 +81,28 @@ jobs:
fail-fast: false
matrix:
include:
- workspace: basic_cli-${{ github.run_number }}-${{ github.run_attempt }}
example_dir: ./examples/poc/sonar_basic_deployment
aws_region: eu-west-2
hub_output: '.dsf_hub.value.public_dns'
gw_output: '.dsf_agentless_gw.value."agentless-gw-0".private_ip'
- workspace: hadr_cli-${{ github.run_number }}-${{ github.run_attempt }}
example_dir: ./examples/poc/sonar_hadr_deployment
aws_region: eu-west-1
# - workspace: basic_cli-${{ github.run_number }}-${{ github.run_attempt }}
# example_dir: ./examples/poc/sonar_basic_deployment
# aws_region: eu-west-2
# hub_output: '.dsf_hub.value.public_dns'
# gw_output: '.dsf_agentless_gw.value."agentless-gw-0".private_ip'
# - workspace: hadr_cli-${{ github.run_number }}-${{ github.run_attempt }}
# example_dir: ./examples/poc/sonar_hadr_deployment
# aws_region: eu-west-1
# hub_output: '.dsf_hubs.value.main.public_dns'
# gw_output: '.dsf_agentless_gw.value."agentless-gw-0".main.private_ip'
- workspace: azure_cli-${{ github.run_number }}-${{ github.run_attempt }}
example_dir: ./examples/azure/dsf_deployment
hub_output: '.dsf_hubs.value.main.public_dns'
gw_output: '.dsf_agentless_gw.value."agentless-gw-0".main.private_ip'

name: 'Terraform ${{ matrix.workspace }}'
runs-on: ubuntu-latest
env:
EXAMPLE_DIR: ${{ matrix.example_dir }}
TF_WORKSPACE: ${{ matrix.workspace }}
AWS_REGION: ${{ matrix.aws_region }}
# AWS_REGION: ${{ matrix.aws_region }}
HUB_OUTPUT: ${{ matrix.hub_output }}
GW_OUTPUT: ${{ matrix.gw_output }}
environment: test
Expand All @@ -119,7 +129,7 @@ jobs:
- name: Change the modules source to local
if: ${{ inputs.use_modules_from_terraform_registry == false }}
run: |
find ./examples/ -type f -exec sed -i -f sed.expr {} \;
find $EXAMPLE_DIR -type f -exec sed -i -f sed.expr {} \;
- name: Sets env vars for environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar_poc_cli_azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ env:
ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }}
ARM_TENANT_ID: ${{ vars.ARM_TENANT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
permissions:
permissions:
contents: read

jobs:
Expand Down

0 comments on commit 8aab090

Please sign in to comment.