From 0a6f634c516cf3a289e7802fcca70e9f0aee1112 Mon Sep 17 00:00:00 2001 From: sfdevops Date: Thu, 26 Sep 2024 10:49:59 +0530 Subject: [PATCH] buildspec.yaml modified --- files/tenant-samples/bridge/buildspec.yaml | 24 +++++++++++----------- files/tenant-samples/silo/buildspec.yaml | 18 ++++++++-------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/files/tenant-samples/bridge/buildspec.yaml b/files/tenant-samples/bridge/buildspec.yaml index 0178d215..854c0ecc 100644 --- a/files/tenant-samples/bridge/buildspec.yaml +++ b/files/tenant-samples/bridge/buildspec.yaml @@ -102,8 +102,8 @@ phases: - envsubst < config.txt > config.${TIER}.hcl - envsubst ${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 @@ -111,15 +111,15 @@ phases: - envsubst < config.txt > config.${KEY}.hcl - envsubst ${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: @@ -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 diff --git a/files/tenant-samples/silo/buildspec.yaml b/files/tenant-samples/silo/buildspec.yaml index 3be5e421..2d99ca1f 100644 --- a/files/tenant-samples/silo/buildspec.yaml +++ b/files/tenant-samples/silo/buildspec.yaml @@ -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 @@ -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