From 4d645428908e310189595364578fc6d9aa3b3d80 Mon Sep 17 00:00:00 2001 From: Ajit Padhi Date: Wed, 13 Nov 2024 16:47:14 +0530 Subject: [PATCH 1/2] Updated git workflow and bicep for multi pipeline based on branch --- .github/workflows/build-docker-images.yml | 6 +- .github/workflows/build-docker.yml | 4 +- .github/workflows/ci.yml | 17 +- infra/main.bicep | 6 +- infra/main.json | 342 +++++++++++----------- 5 files changed, 195 insertions(+), 180 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 250588ed3..095e4b538 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -4,9 +4,9 @@ on: workflow_run: workflows: [Tests] types: [completed] - branches: [main] + branches: [main, dev, demo] pull_request: - branches: [main] + branches: [main, dev, demo] types: - opened - ready_for_review @@ -32,5 +32,5 @@ jobs: username: cwydcontainerreg app_name: ${{ matrix.app_name }} dockerfile: ${{ matrix.dockerfile }} - push: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' }} + push: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'dev' || github.event.workflow_run.head_branch == 'demo' }} secrets: inherit diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 6f6fe1a7d..40398698e 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -51,7 +51,7 @@ jobs: context: . file: ${{ inputs.dockerfile }} push: ${{ inputs.push }} - cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:latest + cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.app_name}}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || 'latest' }} tags: | - ${{ inputs.registry }}/${{ inputs.app_name}}:latest + ${{ inputs.registry }}/${{ inputs.app_name}}:${{ github.ref_name == 'main' && 'latest' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || 'latest' }} ${{ inputs.registry }}/${{ inputs.app_name}}:${{ steps.date.outputs.date }}_${{ github.run_number }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8edfe8954..7f82402f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: push: branches: - main + - dev + - demo schedule: - cron: '0 6,18 * * *' # Runs at 6:00 AM and 6:00 PM GMT @@ -34,6 +36,17 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set imageTag + id: set-image-tag + run: | + if [[ "${{ github.event_name }}" == "schedule" ]]; then + echo "imageTag=latest" >> $GITHUB_ENV + elif [[ "${{ github.ref_name }}" == "main" ]]; then + echo "imageTag=latest" >> $GITHUB_ENV + else + echo "imageTag=${{ github.ref_name }}" >> $GITHUB_ENV + fi + - name: Pre-build image and run make in dev container uses: devcontainers/ci@v0.3 env: @@ -43,8 +56,9 @@ jobs: with: imageName: ghcr.io/roopan-microsoft/psl-cwyd-main cacheFrom: ghcr.io/roopan-microsoft/psl-cwyd-main + imageTag: ${{ env.imageTag }} runCmd: make ci && make deploy - refFilterForPush: refs/heads/main + refFilterForPush: refs/heads/${{ github.event_name == 'schedule' && 'main' || github.ref_name }} env: | AZURE_CLIENT_ID AZURE_CLIENT_SECRET @@ -64,6 +78,7 @@ jobs: with: push: never imageName: ghcr.io/roopan-microsoft/psl-cwyd-main + imageTag: ${{ env.imageTag }} runCmd: make destroy env: | AZURE_CLIENT_ID diff --git a/infra/main.bicep b/infra/main.bicep index b92a9aa7b..5d9009809 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -623,7 +623,7 @@ module web_docker './app/web.bicep' = if (hostingModel == 'container') { name: '${websiteName}-docker' location: location tags: union(tags, { 'azd-service-name': 'web-docker' }) - dockerFullImageName: 'fruoccopublic.azurecr.io/rag-webapp' + dockerFullImageName: 'fruoccopublic.azurecr.io/rag-webapp:latest' appServicePlanId: hostingplan.outputs.name applicationInsightsName: monitoring.outputs.applicationInsightsName healthCheckPath: '/api/health' @@ -783,7 +783,7 @@ module adminweb_docker './app/adminweb.bicep' = if (hostingModel == 'container') name: '${adminWebsiteName}-docker' location: location tags: union(tags, { 'azd-service-name': 'adminweb-docker' }) - dockerFullImageName: 'fruoccopublic.azurecr.io/rag-adminwebapp' + dockerFullImageName: 'fruoccopublic.azurecr.io/rag-adminwebapp:latest' appServicePlanId: hostingplan.outputs.name applicationInsightsName: monitoring.outputs.applicationInsightsName azureOpenAIName: openai.outputs.name @@ -958,7 +958,7 @@ module function_docker './app/function.bicep' = if (hostingModel == 'container') name: '${functionName}-docker' location: location tags: union(tags, { 'azd-service-name': 'function-docker' }) - dockerFullImageName: 'fruoccopublic.azurecr.io/rag-backend' + dockerFullImageName: 'fruoccopublic.azurecr.io/rag-backend:latest' appServicePlanId: hostingplan.outputs.name applicationInsightsName: monitoring.outputs.applicationInsightsName azureOpenAIName: openai.outputs.name diff --git a/infra/main.json b/infra/main.json index d260c7826..009af1426 100644 --- a/infra/main.json +++ b/infra/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16957586838741004318" + "version": "0.31.34.60546", + "templateHash": "11066663538566198133" } }, "parameters": { @@ -682,8 +682,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14453122839528928942" + "version": "0.31.34.60546", + "templateHash": "16376502235448567731" } }, "parameters": { @@ -847,8 +847,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "12121357715793816510" + "version": "0.31.34.60546", + "templateHash": "13364147767022226969" }, "description": "Creates an Azure Key Vault." }, @@ -940,8 +940,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13123022401063321803" + "version": "0.31.34.60546", + "templateHash": "5846053745240336221" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -1095,8 +1095,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13123022401063321803" + "version": "0.31.34.60546", + "templateHash": "5846053745240336221" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -1244,8 +1244,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -1313,8 +1313,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -1382,8 +1382,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -1451,8 +1451,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -1524,8 +1524,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13123022401063321803" + "version": "0.31.34.60546", + "templateHash": "5846053745240336221" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -1692,8 +1692,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "15528430944298201007" + "version": "0.31.34.60546", + "templateHash": "9526483378278704058" } }, "parameters": { @@ -1924,8 +1924,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13584246975784398226" + "version": "0.31.34.60546", + "templateHash": "12402174270479558945" }, "description": "Creates an Azure AI Search instance." }, @@ -2089,8 +2089,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "9286637480882627742" + "version": "0.31.34.60546", + "templateHash": "11168587044178660695" }, "description": "Creates an Azure App Service plan." }, @@ -2273,8 +2273,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2593132916851063512" + "version": "0.31.34.60546", + "templateHash": "9347651394814311894" } }, "parameters": { @@ -2455,8 +2455,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "7732628295698757767" + "version": "0.31.34.60546", + "templateHash": "14818871229133632920" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -2682,8 +2682,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16930852302813854027" + "version": "0.31.34.60546", + "templateHash": "3955925289075906039" }, "description": "Updates app settings for an Azure App Service." }, @@ -2760,8 +2760,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -2829,8 +2829,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -2898,8 +2898,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -2967,8 +2967,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -3033,8 +3033,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "465622386717580763" + "version": "0.31.34.60546", + "templateHash": "17352167468248267479" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -3107,8 +3107,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2622922268469466870" + "version": "0.31.34.60546", + "templateHash": "8033637033572984239" }, "description": "Creates a SQL role assignment under an Azure Cosmos DB account." }, @@ -3195,7 +3195,7 @@ "value": "[union(variables('tags'), createObject('azd-service-name', 'web-docker'))]" }, "dockerFullImageName": { - "value": "fruoccopublic.azurecr.io/rag-webapp" + "value": "fruoccopublic.azurecr.io/rag-webapp:latest" }, "appServicePlanId": { "value": "[reference(resourceId('Microsoft.Resources/deployments', parameters('hostingPlanName')), '2022-09-01').outputs.name.value]" @@ -3299,8 +3299,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2593132916851063512" + "version": "0.31.34.60546", + "templateHash": "9347651394814311894" } }, "parameters": { @@ -3481,8 +3481,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "7732628295698757767" + "version": "0.31.34.60546", + "templateHash": "14818871229133632920" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -3708,8 +3708,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16930852302813854027" + "version": "0.31.34.60546", + "templateHash": "3955925289075906039" }, "description": "Updates app settings for an Azure App Service." }, @@ -3786,8 +3786,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -3855,8 +3855,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -3924,8 +3924,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -3993,8 +3993,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -4059,8 +4059,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "465622386717580763" + "version": "0.31.34.60546", + "templateHash": "17352167468248267479" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -4133,8 +4133,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2622922268469466870" + "version": "0.31.34.60546", + "templateHash": "8033637033572984239" }, "description": "Creates a SQL role assignment under an Azure Cosmos DB account." }, @@ -4321,8 +4321,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "17862689402403811352" + "version": "0.31.34.60546", + "templateHash": "16426772879193976216" } }, "parameters": { @@ -4492,8 +4492,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "7732628295698757767" + "version": "0.31.34.60546", + "templateHash": "14818871229133632920" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -4719,8 +4719,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16930852302813854027" + "version": "0.31.34.60546", + "templateHash": "3955925289075906039" }, "description": "Updates app settings for an Azure App Service." }, @@ -4797,8 +4797,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -4866,8 +4866,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -4935,8 +4935,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -5004,8 +5004,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -5070,8 +5070,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "465622386717580763" + "version": "0.31.34.60546", + "templateHash": "17352167468248267479" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -5170,7 +5170,7 @@ "value": "[union(variables('tags'), createObject('azd-service-name', 'adminweb-docker'))]" }, "dockerFullImageName": { - "value": "fruoccopublic.azurecr.io/rag-adminwebapp" + "value": "fruoccopublic.azurecr.io/rag-adminwebapp:latest" }, "appServicePlanId": { "value": "[reference(resourceId('Microsoft.Resources/deployments', parameters('hostingPlanName')), '2022-09-01').outputs.name.value]" @@ -5267,8 +5267,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "17862689402403811352" + "version": "0.31.34.60546", + "templateHash": "16426772879193976216" } }, "parameters": { @@ -5438,8 +5438,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "7732628295698757767" + "version": "0.31.34.60546", + "templateHash": "14818871229133632920" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -5665,8 +5665,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16930852302813854027" + "version": "0.31.34.60546", + "templateHash": "3955925289075906039" }, "description": "Updates app settings for an Azure App Service." }, @@ -5743,8 +5743,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -5812,8 +5812,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -5881,8 +5881,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -5950,8 +5950,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -6016,8 +6016,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "465622386717580763" + "version": "0.31.34.60546", + "templateHash": "17352167468248267479" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -6129,8 +6129,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "2390666818608223959" + "version": "0.31.34.60546", + "templateHash": "8473455776229346647" }, "description": "Creates an Application Insights instance and a Log Analytics workspace." }, @@ -6181,8 +6181,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "19694557100387265" + "version": "0.31.34.60546", + "templateHash": "15449976264810996474" }, "description": "Creates a Log Analytics workspace." }, @@ -6262,8 +6262,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16993757720869129667" + "version": "0.31.34.60546", + "templateHash": "16358460762600875186" }, "description": "Creates an Application Insights instance based on an existing Log Analytics workspace." }, @@ -6327,8 +6327,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "12524466040979787143" + "version": "0.31.34.60546", + "templateHash": "1003060957409338499" }, "description": "Creates a dashboard for an Application Insights instance." }, @@ -7662,8 +7662,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "15151749822990864279" + "version": "0.31.34.60546", + "templateHash": "12632171944221294691" } }, "parameters": { @@ -7745,8 +7745,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "15030863077610448627" + "version": "0.31.34.60546", + "templateHash": "10154909114565024920" } }, "parameters": { @@ -7939,8 +7939,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1242656561988928447" + "version": "0.31.34.60546", + "templateHash": "9410273585702095132" } }, "parameters": { @@ -8135,8 +8135,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8206949151292074536" + "version": "0.31.34.60546", + "templateHash": "7133078529690530611" }, "description": "Creates an Azure Function in an existing Azure App Service plan." }, @@ -8346,8 +8346,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "7732628295698757767" + "version": "0.31.34.60546", + "templateHash": "14818871229133632920" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -8573,8 +8573,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16930852302813854027" + "version": "0.31.34.60546", + "templateHash": "3955925289075906039" }, "description": "Updates app settings for an Azure App Service." }, @@ -8650,8 +8650,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -8737,8 +8737,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -8806,8 +8806,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -8875,8 +8875,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -8944,8 +8944,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -9013,8 +9013,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -9079,8 +9079,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "465622386717580763" + "version": "0.31.34.60546", + "templateHash": "17352167468248267479" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -9175,7 +9175,7 @@ "value": "[union(variables('tags'), createObject('azd-service-name', 'function-docker'))]" }, "dockerFullImageName": { - "value": "fruoccopublic.azurecr.io/rag-backend" + "value": "fruoccopublic.azurecr.io/rag-backend:latest" }, "appServicePlanId": { "value": "[reference(resourceId('Microsoft.Resources/deployments', parameters('hostingPlanName')), '2022-09-01').outputs.name.value]" @@ -9260,8 +9260,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "1242656561988928447" + "version": "0.31.34.60546", + "templateHash": "9410273585702095132" } }, "parameters": { @@ -9456,8 +9456,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "8206949151292074536" + "version": "0.31.34.60546", + "templateHash": "7133078529690530611" }, "description": "Creates an Azure Function in an existing Azure App Service plan." }, @@ -9667,8 +9667,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "7732628295698757767" + "version": "0.31.34.60546", + "templateHash": "14818871229133632920" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -9894,8 +9894,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "16930852302813854027" + "version": "0.31.34.60546", + "templateHash": "3955925289075906039" }, "description": "Updates app settings for an Azure App Service." }, @@ -9971,8 +9971,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -10058,8 +10058,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -10127,8 +10127,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -10196,8 +10196,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -10265,8 +10265,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -10334,8 +10334,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -10400,8 +10400,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "465622386717580763" + "version": "0.31.34.60546", + "templateHash": "17352167468248267479" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -10504,8 +10504,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13123022401063321803" + "version": "0.31.34.60546", + "templateHash": "5846053745240336221" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -10655,8 +10655,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "13123022401063321803" + "version": "0.31.34.60546", + "templateHash": "5846053745240336221" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -10809,8 +10809,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "6699069410959282929" + "version": "0.31.34.60546", + "templateHash": "14787323190374281342" } }, "parameters": { @@ -10940,8 +10940,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "10401188783540495741" + "version": "0.31.34.60546", + "templateHash": "17192989974061212120" }, "description": "Creates an Azure storage account." }, @@ -11164,8 +11164,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -11230,8 +11230,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -11296,8 +11296,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -11362,8 +11362,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "14973584850527407631" + "version": "0.31.34.60546", + "templateHash": "5620801774479515492" }, "description": "Creates a role assignment for a service principal." }, @@ -11444,8 +11444,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.30.23.60470", - "templateHash": "17372485166957435450" + "version": "0.31.34.60546", + "templateHash": "14309427698097244890" } }, "parameters": { From 52509b8baa92301884349d1e0d452e7d8b5f19d4 Mon Sep 17 00:00:00 2001 From: Ajit Padhi Date: Wed, 13 Nov 2024 16:56:23 +0530 Subject: [PATCH 2/2] fixed registry issue --- .github/workflows/build-docker-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 095e4b538..b6eb1ed45 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -28,8 +28,8 @@ jobs: dockerfile: docker/Frontend.Dockerfile uses: ./.github/workflows/build-docker.yml with: - registry: cwydcontainerreg.azurecr.io - username: cwydcontainerreg + registry: ${{ github.event.workflow_run.head_branch == 'main' && 'fruoccopublic.azurecr.io' || 'cwydcontainerreg.azurecr.io'}} + username: ${{ github.event.workflow_run.head_branch == 'main' && 'fruoccopublic' || 'cwydcontainerreg'}} app_name: ${{ matrix.app_name }} dockerfile: ${{ matrix.dockerfile }} push: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'dev' || github.event.workflow_run.head_branch == 'demo' }}