Skip to content

Commit

Permalink
Add destroy action to full workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zalbiraw committed Apr 24, 2024
1 parent e340825 commit 8717d65
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aks-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
cd aks
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="cluster_location=${{ vars.AZURE_CLUSTER_LOCATION }}" \
--var="cluster_machine_type=${{ vars.AZURE_CLUSTER_MACHINE_TYPE }}" \
--auto-approve
14 changes: 11 additions & 3 deletions .github/workflows/aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: AKS Performance Test
on:
workflow_dispatch:
inputs:
action:
description: 'Action'
required: false
default: 'apply'
type: choice
options:
- apply
- destroy
analytics_enabled:
description: 'Enabled Analytics gathering'
required: false
Expand Down Expand Up @@ -75,7 +83,7 @@ jobs:
run: |
cd aks
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="cluster_location=${{ vars.AZURE_CLUSTER_LOCATION }}" \
--var="cluster_machine_type=${{ vars.AZURE_CLUSTER_MACHINE_TYPE }}" \
--auto-approve
Expand All @@ -92,7 +100,7 @@ jobs:
run: |
cd deployments
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="kubernetes_config_context=performance-testing-aks" \
--var="analytics_enabled=${{ inputs.analytics_enabled }}" \
--var="auth_enabled=${{ inputs.auth_enabled }}" \
Expand All @@ -108,7 +116,7 @@ jobs:
run: |
cd tests
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="kubernetes_config_context=performance-testing-aks" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: EKS Performance Test
on:
workflow_dispatch:
inputs:
action:
description: 'Action'
required: false
default: 'apply'
type: choice
options:
- apply
- destroy
analytics_enabled:
description: 'Enabled Analytics gathering'
required: false
Expand Down Expand Up @@ -77,7 +85,7 @@ jobs:
run: |
cd eks
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="cluster_location=${{ vars.AWS_CLUSTER_LOCATION }}" \
--var="cluster_machine_type=${{ vars.AWS_CLUSTER_MACHINE_TYPE }}" \
--auto-approve
Expand All @@ -92,7 +100,7 @@ jobs:
run: |
cd deployments
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="kubernetes_config_context=performance-testing-eks" \
--var="analytics_enabled=${{ inputs.analytics_enabled }}" \
--var="auth_enabled=${{ inputs.auth_enabled }}" \
Expand All @@ -108,7 +116,7 @@ jobs:
run: |
cd tests
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="kubernetes_config_context=performance-testing-eks" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: GKE Performance Test
on:
workflow_dispatch:
inputs:
action:
description: 'Action'
required: false
default: 'apply'
type: choice
options:
- apply
- destroy
analytics_enabled:
description: 'Enabled Analytics gathering'
required: false
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:
run: |
cd gke
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="project=${{ secrets.GCP_PROJECT }}" \
--var="cluster_location=${{ vars.GCP_CLUSTER_LOCATION }}" \
--var="cluster_machine_type=${{ vars.GCP_CLUSTER_MACHINE_TYPE }}" \
Expand All @@ -99,7 +107,7 @@ jobs:
run: |
cd deployments
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="kubernetes_config_context=performance-testing-gke" \
--var="analytics_enabled=${{ inputs.analytics_enabled }}" \
--var="auth_enabled=${{ inputs.auth_enabled }}" \
Expand All @@ -115,7 +123,7 @@ jobs:
run: |
cd tests
terraform init
terraform apply \
terraform ${{ inputs.action }} \
--var="kubernetes_config_context=performance-testing-gke" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
Expand Down

0 comments on commit 8717d65

Please sign in to comment.