From 47350e5fa58e9bc40564a428eda00ec783d0c9e7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 3 Oct 2025 11:54:36 -1000 Subject: [PATCH 1/2] Update deploy-instance.sh --- .github/scripts/deploy-instance.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/scripts/deploy-instance.sh b/.github/scripts/deploy-instance.sh index 85e0aa2..3ab5559 100644 --- a/.github/scripts/deploy-instance.sh +++ b/.github/scripts/deploy-instance.sh @@ -11,10 +11,11 @@ if ! kubectl get namespace/ci-{{INSTANCE}}-ns-pm4 >/dev/null 2>&1; then # Use admin password from secrets echo "Update instance yamls" - export RDS_ADMIN_PASSWORD=$RDS_ADMIN_PASSWORD - export RDS_ADMIN_USERNAME=$RDS_ADMIN_USERNAME - sed -i "s/{{MYSQL_USERNAME}}/$RDS_ADMIN_USERNAME/" .github/templates/db.yaml - sed -i "s/{{MYSQL_PASSWORD}}/$RDS_ADMIN_PASSWORD/" .github/templates/db.yaml + # Remove these lines - they're already done in the workflow + # export RDS_ADMIN_PASSWORD=$RDS_ADMIN_PASSWORD + # export RDS_ADMIN_USERNAME=$RDS_ADMIN_USERNAME + # sed -i "s/{{MYSQL_USERNAME}}/$RDS_ADMIN_USERNAME/" .github/templates/db.yaml + # sed -i "s/{{MYSQL_PASSWORD}}/$RDS_ADMIN_PASSWORD/" .github/templates/db.yaml echo "Creating DB :: pm4_ci-{{INSTANCE}}" cat .github/templates/db.yaml kubectl apply -f .github/templates/db.yaml --v=4 @@ -33,8 +34,9 @@ if ! kubectl get namespace/ci-{{INSTANCE}}-ns-pm4 >/dev/null 2>&1; then echo "Removing Job" kubectl delete job mysql-setup-job-ci-{{INSTANCE}} echo "Deploying Instance :: ci-{{INSTANCE}}" - sed -i "s/{{MYSQL_PASSWORD}}/$RDS_ADMIN_PASSWORD/" .github/templates/instance.yaml - sed -i "s/{{MYSQL_USER}}/$RDS_ADMIN_USERNAME/" .github/templates/instance.yaml + # Remove these lines - they're already done in the workflow + # sed -i "s/{{MYSQL_PASSWORD}}/$RDS_ADMIN_PASSWORD/" .github/templates/instance.yaml + # sed -i "s/{{MYSQL_USER}}/$RDS_ADMIN_USERNAME/" .github/templates/instance.yaml cat .github/templates/instance.yaml # Evaluate the command and store the result APP_VERSION=$(echo "$CI_PROJECT-$CI_PACKAGE_BRANCH" | sed "s;/;-;g" | sed "s/refs-heads-//g") From 964877ddc431d467f12a875731ba624a1c4f53b2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 3 Oct 2025 11:55:29 -1000 Subject: [PATCH 2/2] Update deploy-instance.sh --- .github/scripts/deploy-instance.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/scripts/deploy-instance.sh b/.github/scripts/deploy-instance.sh index 3ab5559..e1d5be4 100644 --- a/.github/scripts/deploy-instance.sh +++ b/.github/scripts/deploy-instance.sh @@ -10,12 +10,6 @@ if ! kubectl get namespace/ci-{{INSTANCE}}-ns-pm4 >/dev/null 2>&1; then echo "Creating DB" # Use admin password from secrets echo "Update instance yamls" - - # Remove these lines - they're already done in the workflow - # export RDS_ADMIN_PASSWORD=$RDS_ADMIN_PASSWORD - # export RDS_ADMIN_USERNAME=$RDS_ADMIN_USERNAME - # sed -i "s/{{MYSQL_USERNAME}}/$RDS_ADMIN_USERNAME/" .github/templates/db.yaml - # sed -i "s/{{MYSQL_PASSWORD}}/$RDS_ADMIN_PASSWORD/" .github/templates/db.yaml echo "Creating DB :: pm4_ci-{{INSTANCE}}" cat .github/templates/db.yaml kubectl apply -f .github/templates/db.yaml --v=4 @@ -34,9 +28,6 @@ if ! kubectl get namespace/ci-{{INSTANCE}}-ns-pm4 >/dev/null 2>&1; then echo "Removing Job" kubectl delete job mysql-setup-job-ci-{{INSTANCE}} echo "Deploying Instance :: ci-{{INSTANCE}}" - # Remove these lines - they're already done in the workflow - # sed -i "s/{{MYSQL_PASSWORD}}/$RDS_ADMIN_PASSWORD/" .github/templates/instance.yaml - # sed -i "s/{{MYSQL_USER}}/$RDS_ADMIN_USERNAME/" .github/templates/instance.yaml cat .github/templates/instance.yaml # Evaluate the command and store the result APP_VERSION=$(echo "$CI_PROJECT-$CI_PACKAGE_BRANCH" | sed "s;/;-;g" | sed "s/refs-heads-//g")