diff --git a/.github/workflows/build-push-deploy.yaml b/.github/workflows/build-push-deploy.yaml index 5fb3bda..fc209de 100644 --- a/.github/workflows/build-push-deploy.yaml +++ b/.github/workflows/build-push-deploy.yaml @@ -24,18 +24,17 @@ jobs: - name: Fetch Parameter from SSM and set as env variable run: | - ECR_REPO=$(aws ssm get-parameter --name "/ecr_repo_name" --query "Parameter.Value" --output text --region ${{ env.region }}) - echo "ECR_REPO=$ECR_REPO" >> $GITHUB_ENV + ECR_REGISTRY_URL=$(aws ssm get-parameter --name "/ecr_registry_url" --query "Parameter.Value" --output text --region ${{ env.region }}) + echo "ECR_REGISTRY_URL=$ECR_REGISTRY_URL" >> $GITHUB_ENV - name: Build, Tag, and Push the Image to Amazon ECR id: build-image env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - ECR_REPOSITORY: ${{ env.ECR_REPO }} + ECR_REGISTRY: ${{ env.ECR_REGISTRY }} IMAGE_TAG: ${{ github.sha }} run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest mysql-connect-app - docker push -a $ECR_REGISTRY/$ECR_REPOSITORY + docker build -t $ECR_REGISTRYY:$IMAGE_TAG -t $ECR_REGISTRY:latest mysql-connect-app + docker push -a $ECR_REGISTRY deploy: name: Deploy Helm chart diff --git a/mysql-connect-app/app.py b/mysql-connect-app/app.py index 7b3dd28..e2cf49c 100644 --- a/mysql-connect-app/app.py +++ b/mysql-connect-app/app.py @@ -24,4 +24,3 @@ if connection: connection.close() print("Connection closed.") -time.sleep(100000)