From 9847480e7d65c5effb423ea9d19b84f7bb43ae50 Mon Sep 17 00:00:00 2001 From: Ramiro Blanco Date: Thu, 27 Jun 2024 18:12:46 -0300 Subject: [PATCH 1/2] feat(deploy): Sync env vars before deployment --- .github/workflows/bulid-and-deploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/bulid-and-deploy.yml b/.github/workflows/bulid-and-deploy.yml index c09c9f99..8b88c402 100644 --- a/.github/workflows/bulid-and-deploy.yml +++ b/.github/workflows/bulid-and-deploy.yml @@ -38,6 +38,10 @@ jobs: aws-region: ${{ env.AWS_REGION }} - name: Create Kubeconfig with AWS CLI run: aws eks update-kubeconfig --region ${{ env.AWS_REGION }} --name ${{ env.EKS_CLUSTER_NAME }} + - name: Update Environment Variables + env: + CL_ENV: bots-env + run: kubectl annotate es $CL_ENV force-sync=$(date +%s) --overwrite -n ${{ env.EKS_NAMESPACE }} && kubectl wait es -n ${{ env.EKS_NAMESPACE }} --for=jsonpath="{.status.conditions[?(@.reason=='SecretSynced')].status}"=True --timeout=30s $CL_ENV - name: Collect static assets and check unapplied migration exit code id: checkMigration # Do big complicated thing to get secrets into the image. From 375d8dd41013d9de47da9df3cb11c75e3c6f4352 Mon Sep 17 00:00:00 2001 From: Ramiro Blanco Date: Thu, 27 Jun 2024 22:02:37 -0300 Subject: [PATCH 2/2] feat(deploy): Correct workflow env var name for bots-env --- .github/workflows/bulid-and-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bulid-and-deploy.yml b/.github/workflows/bulid-and-deploy.yml index 8b88c402..2d9aa9db 100644 --- a/.github/workflows/bulid-and-deploy.yml +++ b/.github/workflows/bulid-and-deploy.yml @@ -40,8 +40,8 @@ jobs: run: aws eks update-kubeconfig --region ${{ env.AWS_REGION }} --name ${{ env.EKS_CLUSTER_NAME }} - name: Update Environment Variables env: - CL_ENV: bots-env - run: kubectl annotate es $CL_ENV force-sync=$(date +%s) --overwrite -n ${{ env.EKS_NAMESPACE }} && kubectl wait es -n ${{ env.EKS_NAMESPACE }} --for=jsonpath="{.status.conditions[?(@.reason=='SecretSynced')].status}"=True --timeout=30s $CL_ENV + BOTS_ENV: bots-env + run: kubectl annotate es $BOTS_ENV force-sync=$(date +%s) --overwrite -n ${{ env.EKS_NAMESPACE }} && kubectl wait es -n ${{ env.EKS_NAMESPACE }} --for=jsonpath="{.status.conditions[?(@.reason=='SecretSynced')].status}"=True --timeout=30s $BOTS_ENV - name: Collect static assets and check unapplied migration exit code id: checkMigration # Do big complicated thing to get secrets into the image.