From 1fcc090d79246a1c7c89a1c6c6a0e4de9c37e536 Mon Sep 17 00:00:00 2001 From: Mike Rousos Date: Wed, 2 Oct 2024 11:31:08 -0400 Subject: [PATCH] Upgrade to AZD 1.10.1 and specify explicit ACA version when deploying --- .devcontainer/devcontainer.json | 8 ++++---- .github/workflows/azure-dev.yml | 6 +++--- .github/workflows/scheduled-azure-dev.yml | 6 +++--- .github/workflows/scheduled-azure-teardown.yml | 8 ++++---- azure.yaml | 1 + .../core/compute/postDeploymentScript/post-deployment.sh | 4 ++-- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dee8272..d33bcfb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,14 +2,14 @@ "name": "web-app-pattern-dotnet", "build": { "dockerfile": "Dockerfile", - "args": { + "args": { "VARIANT": "8.0-bookworm" } }, "runArgs": ["--init", "--privileged"], "customizations": { - "vscode": { + "vscode": { "extensions": [ "ms-azuretools.azure-dev", "ms-azuretools.vscode-azureappservice", @@ -35,7 +35,7 @@ // - /.github/workflows/azure-dev.yml // - /.github/workflows/scheduled-azure-dev.yml // - /.github/workflows/scheduled-azure-teardown.yml - "version": "1.9.5" + "version": "1.10.1" }, "ghcr.io/devcontainers/features/docker-in-docker:2": { "version": "latest" @@ -51,4 +51,4 @@ }, // resolves error: dubious ownership of the workspace folder "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}" -} \ No newline at end of file +} diff --git a/.github/workflows/azure-dev.yml b/.github/workflows/azure-dev.yml index c35513d..739b4c4 100644 --- a/.github/workflows/azure-dev.yml +++ b/.github/workflows/azure-dev.yml @@ -12,11 +12,11 @@ jobs: build: runs-on: ubuntu-latest container: - image: mcr.microsoft.com/azure-dev-cli-apps:1.9.5 + image: mcr.microsoft.com/azure-dev-cli-apps:1.10.1 steps: - name: Checkout uses: actions/checkout@v2 - + # login to run ado commands such provision, deploy, and down - name: Log in with Azure (Client Credentials) if: ${{ env.AZURE_CREDENTIALS != '' }} @@ -31,7 +31,7 @@ jobs: shell: pwsh env: AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }} - + - name: Azure Dev Provision run: azd provision --no-prompt env: diff --git a/.github/workflows/scheduled-azure-dev.yml b/.github/workflows/scheduled-azure-dev.yml index 4bb6739..3988cb5 100644 --- a/.github/workflows/scheduled-azure-dev.yml +++ b/.github/workflows/scheduled-azure-dev.yml @@ -20,7 +20,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: mcr.microsoft.com/azure-dev-cli-apps:1.9.5 + image: mcr.microsoft.com/azure-dev-cli-apps:1.10.1 env: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -40,7 +40,7 @@ jobs: - name: Check configuration if: ${{ env.AZURE_CLIENT_ID == '' }} run: echo "AZURE_CLIENT_ID are not available." - + # login to run ado commands such provision, deploy, and down - name: Log in with Azure (Federated Credentials) if: ${{ env.AZURE_CLIENT_ID != '' }} @@ -50,7 +50,7 @@ jobs: --federated-credential-provider "github" ` --tenant-id "$Env:AZURE_TENANT_ID" ` shell: pwsh - + # login to run azd hooks and the QA validation script - name: Log in with Azure CLI if: ${{ env.AZURE_CLIENT_ID != '' }} diff --git a/.github/workflows/scheduled-azure-teardown.yml b/.github/workflows/scheduled-azure-teardown.yml index 891e017..e1fed7b 100644 --- a/.github/workflows/scheduled-azure-teardown.yml +++ b/.github/workflows/scheduled-azure-teardown.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: schedule: - cron: '0 13 1 * *' # Run at 13:00 on the 1st day of the month - + # https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication permissions: id-token: write @@ -19,7 +19,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: mcr.microsoft.com/azure-dev-cli-apps:1.9.5 + image: mcr.microsoft.com/azure-dev-cli-apps:1.10.1 env: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} @@ -35,7 +35,7 @@ jobs: - name: Install Az module run: Install-Module -Name Az -Force -AllowClobber -Scope CurrentUser -Repository PSGallery shell: pwsh - + # login to run ado commands such provision, deploy, and down - name: Log in with Azure (Federated Credentials) if: ${{ env.AZURE_CLIENT_ID != '' }} @@ -45,7 +45,7 @@ jobs: --federated-credential-provider "github" ` --tenant-id "$Env:AZURE_TENANT_ID" ` shell: pwsh - + # login to run azd hooks and the QA validation script - name: Log in with Azure CLI if: ${{ env.AZURE_CLIENT_ID != '' }} diff --git a/azure.yaml b/azure.yaml index c7a621d..ae15b17 100644 --- a/azure.yaml +++ b/azure.yaml @@ -56,6 +56,7 @@ services: project: src/Relecloud.TicketRenderer language: dotnet host: containerapp + apiVersion: 2024-02-02-preview # Force `azd` to use this API version for GET/PATCH operations docker: # These paths are relative to the project directory path: ./Dockerfile diff --git a/infra/core/compute/postDeploymentScript/post-deployment.sh b/infra/core/compute/postDeploymentScript/post-deployment.sh index 68bd502..fa2ddaf 100644 --- a/infra/core/compute/postDeploymentScript/post-deployment.sh +++ b/infra/core/compute/postDeploymentScript/post-deployment.sh @@ -1,7 +1,7 @@ #!/bin/bash # install AZD - keep this version in sync with the version used in the file /.devcontainer/devcontainer.json file -curl -fsSL https://aka.ms/install-azd.sh | bash -s -- -- version 1.9.5 +curl -fsSL https://aka.ms/install-azd.sh | bash -s -- -- version 1.10.1 # add Microsoft package feed for the dotnet install # Get Ubuntu version @@ -62,4 +62,4 @@ echo \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update -sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin \ No newline at end of file +sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin