Skip to content

Commit

Permalink
buildspec.yaml modified
Browse files Browse the repository at this point in the history
  • Loading branch information
sfdevops committed Sep 26, 2024
1 parent e68dc79 commit 0a6f634
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions files/tenant-samples/bridge/buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,24 +102,24 @@ phases:
- envsubst < config.txt > config.${TIER}.hcl
- envsubst <tfvariables.txt> ${TIER}.tfvars
# Run Terraform to create pooled infra
#- terraform init --backend-config=config.${TIER}.hcl
#- terraform apply -auto-approve
- terraform init --backend-config=config.${TIER}.hcl
- terraform apply -auto-approve
- cd ..

# Creating terraform backend config and tfvars at run time and Run terraform to create resources for tenant
- export TF_KEY=${KEY}/${KEY}.tfstate
- envsubst < config.txt > config.${KEY}.hcl
- envsubst <tfvariables.txt> ${KEY}.tfvars
- terraform init --backend-config=config.${KEY}.hcl
#- terraform apply --var=canary_enabled=false -auto-approve # as tenant application is not up so canary will be run afterwards
- terraform apply --var=canary_enabled=false -auto-approve # as tenant application is not up so canary will be run afterwards
# Push value to tenant management gitops repository
#- chmod +x push-values.sh
#- ./push-values.sh
#- kubectl apply -f ${TIER}-argo-workflow.yaml --namespace argo-workflows || true
#- kubectl apply -f argocd-application.yaml --namespace argocd || true
#- sleep 240 # waiting time to spin up tenant pods
- terraform destroy -auto-approve --refresh=false # refresh is false to avoid unnecessary API hitting
#- kubectl apply -f argo-workflow.yaml --namespace argo-workflows || true
- chmod +x push-values.sh
- ./push-values.sh
- kubectl apply -f ${TIER}-argo-workflow.yaml --namespace argo-workflows || true
- kubectl apply -f argocd-application.yaml --namespace argocd || true
- sleep 240 # waiting time to spin up tenant pods
- terraform apply -auto-approve --refresh=false # refresh is false to avoid unnecessary API hitting
- kubectl apply -f argo-workflow.yaml --namespace argo-workflows || true


finally:
Expand All @@ -130,8 +130,8 @@ phases:
- export CODEBUILD_BUILD_POSTBUILD=1
- export CREATE_USER=1
# To run the webhook which will send notification and create tenant first admin user in pooled database
#- node $WEBHOOK_PATH
#- python push_to_dynamodb.py # pushing tenant config to dynamodb based on tenant_id mapping
- node $WEBHOOK_PATH
- python push_to_dynamodb.py # pushing tenant config to dynamodb based on tenant_id mapping



Expand Down
18 changes: 9 additions & 9 deletions files/tenant-samples/silo/buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ phases:

# Run Terraform to create infra and apply helm
- terraform init --backend-config=config.${KEY}.hcl
#- terraform apply --var=canary_enabled=false -auto-approve # as tenant application is not up so canary will be run afterwards
#- chmod +x push-values.sh
#- ./push-values.sh # push values to tenant management gitops repository
#- kubectl apply -f argocd-application.yaml --namespace argocd || true
#- sleep 240 # waiting time to spin up tenant pods
- terraform destroy -auto-approve --refresh=false # refresh is false to avoid API hitting
#- kubectl apply -f argo-workflow.yaml --namespace argo-workflows || true
- terraform apply --var=canary_enabled=false -auto-approve # as tenant application is not up so canary will be run afterwards
- chmod +x push-values.sh
- ./push-values.sh # push values to tenant management gitops repository
- kubectl apply -f argocd-application.yaml --namespace argocd || true
- sleep 240 # waiting time to spin up tenant pods
- terraform apply -auto-approve --refresh=false # refresh is false to avoid API hitting
- kubectl apply -f argo-workflow.yaml --namespace argo-workflows || true
finally:
- node $WEBHOOK_PATH

Expand All @@ -123,8 +123,8 @@ phases:
commands:
- export CODEBUILD_BUILD_POSTBUILD=1
- export CREATE_USER=0
#- node $WEBHOOK_PATH
#- python push_to_dynamodb.py # pushing tenant config to dynamodb based on tenant_id mapping
- node $WEBHOOK_PATH
- python push_to_dynamodb.py # pushing tenant config to dynamodb based on tenant_id mapping



Expand Down

0 comments on commit 0a6f634

Please sign in to comment.