From f8dd59ccae42a993f0a2849ab68cef9dc8c12f10 Mon Sep 17 00:00:00 2001 From: Joshua Lester Date: Thu, 8 Jan 2026 10:23:22 -0800 Subject: [PATCH 1/8] update to net 10 + initial CI pipeline --- .github/workflows/Build-Test-And-Deploy.yaml | 165 ++++++++++++++++++ Directory.Packages.props | 10 +- Dockerfile | 4 +- azure-pipelines-CI.yml | 4 +- azure-pipelines.yml | 4 +- eng/build.ps1 | 2 +- global.json | 4 +- ...icrosoft.TryDotNet.IntegrationTests.csproj | 4 +- ...rosoft.TryDotNet.SimulatorGenerator.csproj | 3 +- .../Microsoft.TryDotNet.Tests.csproj | 4 +- .../Microsoft.TryDotNet.WasmRunner.csproj | 2 +- .../Microsoft.TryDotNet.csproj | 4 +- 12 files changed, 184 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/Build-Test-And-Deploy.yaml diff --git a/.github/workflows/Build-Test-And-Deploy.yaml b/.github/workflows/Build-Test-And-Deploy.yaml new file mode 100644 index 000000000..8cf1ccddd --- /dev/null +++ b/.github/workflows/Build-Test-And-Deploy.yaml @@ -0,0 +1,165 @@ +name: Build, Test, and Deploy EssentialCSharp.Web + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + build-and-test: + runs-on: ubuntu-latest + environment: "BuildAndUploadImage" + + steps: + - uses: actions/checkout@v6 + + - name: Set up .NET + uses: actions/setup-dotnet@v5 + with: + global-json-file: global.json + + - name: Set up dependency caching for faster builds + uses: actions/cache@v5 + id: nuget-cache + with: + path: | + ~/.nuget/packages + ${{ github.workspace }}/**/obj/project.assets.json + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + ${{ runner.os }}-nuget- + + - name: Restore with dotnet + run: dotnet restore + + - name: Build with dotnet + run: dotnet build -p:ContinuousIntegrationBuild=True -p:ReleaseDateAttribute=True --configuration Release --no-restore + + - name: Run .NET Tests + run: dotnet test --no-build --configuration Release + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Build but no push with a PR + - name: Docker build (no push) + if: github.event_name == 'pull_request' || github.event_name == 'merge_group' + uses: docker/build-push-action@v6 + with: + push: false + tags: temp-pr-validation + file: ./Dockerfile + + - name: Build Container Image + if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request' + uses: docker/build-push-action@v6 + with: + tags: ${{ vars.DEVCONTAINER_REGISTRY }}/try:${{ github.sha }},${{ vars.DEVCONTAINER_REGISTRY }}/try:latest + file: ./Dockerfile + context: . + outputs: type=docker,dest=${{ github.workspace }}/try.tar + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Upload artifact + uses: actions/upload-artifact@v6 + with: + name: tryimage + path: ${{ github.workspace }}/try.tar + +# deploy-development: +# if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request' +# runs-on: ubuntu-latest +# needs: build-and-test +# environment: +# name: "Development" + +# steps: +# - name: Azure Login +# uses: azure/login@v2 +# with: +# client-id: ${{ secrets.ESSENTIALCSHARPDEV_CLIENT_ID }} +# tenant-id: ${{ secrets.ESSENTIALCSHARP_APPIDENTITY_TENANT_ID }} +# subscription-id: ${{ secrets.ESSENTIALCSHARP_SUBSCRIPTION_ID }} + +# - name: Download artifact +# uses: actions/download-artifact@v7 +# with: +# name: essentialcsharpwebimage +# path: ${{ github.workspace }} + +# - name: Load image +# run: | +# docker load --input ${{ github.workspace }}/essentialcsharpwebimage.tar +# docker image ls -a + +# - name: Log in to container registry +# uses: docker/login-action@v3 +# with: +# registry: ${{ vars.DEVCONTAINER_REGISTRY }} +# username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }} +# password: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }} + +# - name: Push Image to Container Registry +# run: docker push --all-tags ${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb + +# - name: Create and Deploy to Container App +# uses: azure/CLI@v2 +# env: +# CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }} +# RESOURCEGROUP: ${{ vars.RESOURCEGROUP }} +# CONTAINER_REGISTRY: ${{ vars.DEVCONTAINER_REGISTRY }} +# CONTAINER_APP_ENVIRONMENT: ${{ vars.CONTAINER_APP_ENVIRONMENT }} +# ACR_USERNAME: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }} +# ACR_PASSWORD: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }} +# with: +# inlineScript: | +# az config set extension.use_dynamic_install=yes_without_prompt +# az containerapp up -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --image $CONTAINER_REGISTRY/essentialcsharpweb:${{ github.sha }} --environment $CONTAINER_APP_ENVIRONMENT --registry-server $CONTAINER_REGISTRY --ingress external --target-port 8080 --registry-username $ACR_USERNAME --registry-password $ACR_PASSWORD + +# - name: Assign Managed Identity to Container App and Set Secrets and Environment Variables +# uses: azure/CLI@v2 +# env: +# CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }} +# RESOURCEGROUP: ${{ vars.RESOURCEGROUP }} +# CONTAINER_REGISTRY: ${{ vars.DEVCONTAINER_REGISTRY }} +# CONTAINER_APP_ENVIRONMENT: ${{ vars.CONTAINER_APP_ENVIRONMENT }} +# KEYVAULTURI: ${{ secrets.ESSENTIALCSHARP_KEYVAULT_URI }} +# MANAGEDIDENTITYID: ${{ secrets.ESSENTIALCSHARP_APPIDENTITY_ID }} +# ACR_USERNAME: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }} +# ACR_PASSWORD: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }} +# AZURECLIENTID: ${{ secrets.IDENTITY_CLIENT_ID }} +# with: +# inlineScript: | +# az containerapp identity assign -n ${{ vars.CONTAINER_APP_NAME }} -g ${{ vars.RESOURCEGROUP }} --user-assigned ${{ vars.CONTAINER_APP_IDENTITY }} +# az containerapp secret set -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --secrets github-clientid=keyvaultref:$KEYVAULTURI/secrets/authentication-github-clientid,identityref:$MANAGEDIDENTITYID \ +# github-clientsecret=keyvaultref:$KEYVAULTURI/secrets/authentication-github-clientsecret,identityref:$MANAGEDIDENTITYID msft-clientid=keyvaultref:$KEYVAULTURI/secrets/authentication-microsoft-clientid,identityref:$MANAGEDIDENTITYID \ +# msft-clientsecret=keyvaultref:$KEYVAULTURI/secrets/authentication-microsoft-clientsecret,identityref:$MANAGEDIDENTITYID emailsender-apikey=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-apikey,identityref:$MANAGEDIDENTITYID \ +# emailsender-secret=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-secretkey,identityref:$MANAGEDIDENTITYID emailsender-name=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-sendfromname,identityref:$MANAGEDIDENTITYID \ +# emailsender-email=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-sendfromemail,identityref:$MANAGEDIDENTITYID connectionstring=keyvaultref:$KEYVAULTURI/secrets/connectionstrings-essentialcsharpwebcontextconnection,identityref:$MANAGEDIDENTITYID \ +# captcha-sitekey=keyvaultref:$KEYVAULTURI/secrets/captcha-sitekey,identityref:$MANAGEDIDENTITYID captcha-secretkey=keyvaultref:$KEYVAULTURI/secrets/captcha-secretkey,identityref:$MANAGEDIDENTITYID \ +# appinsights-connectionstring=keyvaultref:$KEYVAULTURI/secrets/applicationinsights-connectionstring,identityref:$MANAGEDIDENTITYID \ +# ai-endpoint=keyvaultref:$KEYVAULTURI/secrets/AIOptions--Endpoint,identityref:$MANAGEDIDENTITYID ai-apikey=keyvaultref:$KEYVAULTURI/secrets/AIOptions--ApiKey,identityref:$MANAGEDIDENTITYID \ +# ai-vectordeployment=keyvaultref:$KEYVAULTURI/secrets/AIOptions--VectorGenerationDeploymentName,identityref:$MANAGEDIDENTITYID ai-chatdeployment=keyvaultref:$KEYVAULTURI/secrets/AIOptions--ChatDeploymentName,identityref:$MANAGEDIDENTITYID \ +# ai-systemprompt=keyvaultref:$KEYVAULTURI/secrets/AIOptions--SystemPrompt,identityref:$MANAGEDIDENTITYID \ +# postgres-vectorstore-connectionstring=keyvaultref:$KEYVAULTURI/secrets/connectionstrings--PostgresVectorDb,identityref:$MANAGEDIDENTITYID +# az containerapp update --name $CONTAINER_APP_NAME --resource-group $RESOURCEGROUP --replace-env-vars Authentication__github__clientId=secretref:github-clientid Authentication__github__clientSecret=secretref:github-clientsecret \ +# Authentication__microsoft__clientId=secretref:msft-clientid Authentication__microsoft__clientSecret=secretref:msft-clientsecret AuthMessageSender__ApiKey=secretref:emailsender-apikey AuthMessageSender__SecretKey=secretref:emailsender-secret \ +# AuthMessageSender__SendFromName=secretref:emailsender-name AuthMessageSender__SendFromEmail=secretref:emailsender-email ConnectionStrings__EssentialCSharpWebContextConnection=secretref:connectionstring ASPNETCORE_ENVIRONMENT=Staging \ +# AZURE_CLIENT_ID=$AZURECLIENTID HCaptcha__SiteKey=secretref:captcha-sitekey HCaptcha__SecretKey=secretref:captcha-secretkey ApplicationInsights__ConnectionString=secretref:appinsights-connectionstring \ +# AIOptions__Endpoint=secretref:ai-endpoint AIOptions__ApiKey=secretref:ai-apikey AIOptions__VectorGenerationDeploymentName=secretref:ai-vectordeployment AIOptions__ChatDeploymentName=secretref:ai-chatdeployment \ +# AIOptions__SystemPrompt=secretref:ai-systemprompt ConnectionStrings__PostgresVectorStore=secretref:postgres-vectorstore-connectionstring + +# - name: Logout of Azure CLI +# if: always() +# uses: azure/CLI@v2 +# with: +# inlineScript: | +# az logout +# az cache purge +# az account clear \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index a795acae9..e6ff8b6bd 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,10 +7,10 @@ - - - - + + + + @@ -24,7 +24,7 @@ - + diff --git a/Dockerfile b/Dockerfile index 88adbf475..a4721c59b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:9.0-azurelinux3.0 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:10.0-azurelinux3.0 AS build-env WORKDIR /App # Copy everything @@ -24,7 +24,7 @@ RUN dotnet restore --configfile /App/NuGet.config /App/TryDotNet.sln RUN dotnet publish -c Release -o out /App/src/Microsoft.TryDotNet # Build runtime image -FROM mcr.microsoft.com/dotnet/sdk:9.0-azurelinux3.0 +FROM mcr.microsoft.com/dotnet/sdk:10.0-azurelinux3.0 ARG TRY_DOT_NET_BUILD_ID WORKDIR /App diff --git a/azure-pipelines-CI.yml b/azure-pipelines-CI.yml index f7c94e2a2..8c4136f19 100644 --- a/azure-pipelines-CI.yml +++ b/azure-pipelines-CI.yml @@ -130,10 +130,10 @@ extends: value: /p:SignType=$(_SignType) steps: - task: UseDotNet@2 - displayName: Install SDK 9.0.111 + displayName: Install SDK 10.0.100 inputs: packageType: sdk - version: 9.0.111 + version: 10.0.100 - template: /eng/templates/build-and-test-job-windows-templates.yml@self parameters: buildConfig: $(_BuildConfig) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a7bb119b3..7ab91eaca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -78,10 +78,10 @@ stages: value: /p:SignType=$(_SignType) steps: - task: UseDotNet@2 - displayName: Install SDK 9.0.111 + displayName: Install SDK 10.0.100 inputs: packageType: sdk - version: 9.0.111 + version: 10.0.100 - template: /eng/templates/build-and-test-job-windows-templates.yml@self parameters: buildConfig: $(_BuildConfig) diff --git a/eng/build.ps1 b/eng/build.ps1 index fbfe4e521..1111d775f 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -48,7 +48,7 @@ try { # playwright if ($test) { - & $repoRoot\artifacts\bin\Microsoft.TryDotNet.IntegrationTests\$configuration\net9.0\playwright.ps1 install chromium + & $repoRoot\artifacts\bin\Microsoft.TryDotNet.IntegrationTests\$configuration\net10.0\playwright.ps1 install chromium } } } diff --git a/global.json b/global.json index 02e68dde0..1904e310b 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "9.0.111", + "version": "10.0.100", "allowPrerelease": true, "rollForward": "latestMinor" }, "tools": { - "dotnet": "9.0.111", + "dotnet": "10.0.100", "rollForward": "latestMinor" }, "msbuild-sdks": { diff --git a/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj b/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj index dd09f85f8..196d51215 100644 --- a/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj +++ b/src/Microsoft.TryDotNet.IntegrationTests/Microsoft.TryDotNet.IntegrationTests.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable false GeneratedLocation.cs @@ -29,8 +29,6 @@ all runtime; build; native; contentfiles; analyzers - - all diff --git a/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj b/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj index 9a1817f23..f79f6e889 100644 --- a/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj +++ b/src/Microsoft.TryDotNet.SimulatorGenerator/Microsoft.TryDotNet.SimulatorGenerator.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 enable enable embedded @@ -15,7 +15,6 @@ - diff --git a/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj b/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj index 9fcf05f74..917c99fc4 100644 --- a/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj +++ b/src/Microsoft.TryDotNet.Tests/Microsoft.TryDotNet.Tests.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable all @@ -29,8 +29,6 @@ all runtime; build; native; contentfiles; analyzers - - all diff --git a/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj b/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj index d675be24e..71697049c 100644 --- a/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj +++ b/src/Microsoft.TryDotNet.WasmRunner/Microsoft.TryDotNet.WasmRunner.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable wasmrunner diff --git a/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj b/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj index a22b26a51..83b972b7e 100644 --- a/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj +++ b/src/Microsoft.TryDotNet/Microsoft.TryDotNet.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable true @@ -23,8 +23,6 @@ - - From c944ff9be4538cdd77e532c0303a4393251ba2f4 Mon Sep 17 00:00:00 2001 From: Joshua Lester Date: Thu, 8 Jan 2026 10:45:20 -0800 Subject: [PATCH 2/8] adjust pipeline name --- .github/workflows/Build-Test-And-Deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yaml b/.github/workflows/Build-Test-And-Deploy.yaml index 8cf1ccddd..005d8f66d 100644 --- a/.github/workflows/Build-Test-And-Deploy.yaml +++ b/.github/workflows/Build-Test-And-Deploy.yaml @@ -1,4 +1,4 @@ -name: Build, Test, and Deploy EssentialCSharp.Web +name: Build, Test, and Deploy Try .NET API on: push: From 365f4f63848333ba42f12c3a580de8e3b5b71324 Mon Sep 17 00:00:00 2001 From: Joshua Lester Date: Thu, 8 Jan 2026 12:35:41 -0800 Subject: [PATCH 3/8] initial work on deploy job --- .github/workflows/Build-Test-And-Deploy.yaml | 153 ++++++++----------- 1 file changed, 60 insertions(+), 93 deletions(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yaml b/.github/workflows/Build-Test-And-Deploy.yaml index 005d8f66d..041fd8eb9 100644 --- a/.github/workflows/Build-Test-And-Deploy.yaml +++ b/.github/workflows/Build-Test-And-Deploy.yaml @@ -70,96 +70,63 @@ jobs: uses: actions/upload-artifact@v6 with: name: tryimage - path: ${{ github.workspace }}/try.tar - -# deploy-development: -# if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request' -# runs-on: ubuntu-latest -# needs: build-and-test -# environment: -# name: "Development" - -# steps: -# - name: Azure Login -# uses: azure/login@v2 -# with: -# client-id: ${{ secrets.ESSENTIALCSHARPDEV_CLIENT_ID }} -# tenant-id: ${{ secrets.ESSENTIALCSHARP_APPIDENTITY_TENANT_ID }} -# subscription-id: ${{ secrets.ESSENTIALCSHARP_SUBSCRIPTION_ID }} - -# - name: Download artifact -# uses: actions/download-artifact@v7 -# with: -# name: essentialcsharpwebimage -# path: ${{ github.workspace }} - -# - name: Load image -# run: | -# docker load --input ${{ github.workspace }}/essentialcsharpwebimage.tar -# docker image ls -a - -# - name: Log in to container registry -# uses: docker/login-action@v3 -# with: -# registry: ${{ vars.DEVCONTAINER_REGISTRY }} -# username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }} -# password: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }} - -# - name: Push Image to Container Registry -# run: docker push --all-tags ${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb - -# - name: Create and Deploy to Container App -# uses: azure/CLI@v2 -# env: -# CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }} -# RESOURCEGROUP: ${{ vars.RESOURCEGROUP }} -# CONTAINER_REGISTRY: ${{ vars.DEVCONTAINER_REGISTRY }} -# CONTAINER_APP_ENVIRONMENT: ${{ vars.CONTAINER_APP_ENVIRONMENT }} -# ACR_USERNAME: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }} -# ACR_PASSWORD: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }} -# with: -# inlineScript: | -# az config set extension.use_dynamic_install=yes_without_prompt -# az containerapp up -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --image $CONTAINER_REGISTRY/essentialcsharpweb:${{ github.sha }} --environment $CONTAINER_APP_ENVIRONMENT --registry-server $CONTAINER_REGISTRY --ingress external --target-port 8080 --registry-username $ACR_USERNAME --registry-password $ACR_PASSWORD - -# - name: Assign Managed Identity to Container App and Set Secrets and Environment Variables -# uses: azure/CLI@v2 -# env: -# CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }} -# RESOURCEGROUP: ${{ vars.RESOURCEGROUP }} -# CONTAINER_REGISTRY: ${{ vars.DEVCONTAINER_REGISTRY }} -# CONTAINER_APP_ENVIRONMENT: ${{ vars.CONTAINER_APP_ENVIRONMENT }} -# KEYVAULTURI: ${{ secrets.ESSENTIALCSHARP_KEYVAULT_URI }} -# MANAGEDIDENTITYID: ${{ secrets.ESSENTIALCSHARP_APPIDENTITY_ID }} -# ACR_USERNAME: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }} -# ACR_PASSWORD: ${{ secrets.ESSENTIALCSHARP_ACR_PASSWORD }} -# AZURECLIENTID: ${{ secrets.IDENTITY_CLIENT_ID }} -# with: -# inlineScript: | -# az containerapp identity assign -n ${{ vars.CONTAINER_APP_NAME }} -g ${{ vars.RESOURCEGROUP }} --user-assigned ${{ vars.CONTAINER_APP_IDENTITY }} -# az containerapp secret set -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --secrets github-clientid=keyvaultref:$KEYVAULTURI/secrets/authentication-github-clientid,identityref:$MANAGEDIDENTITYID \ -# github-clientsecret=keyvaultref:$KEYVAULTURI/secrets/authentication-github-clientsecret,identityref:$MANAGEDIDENTITYID msft-clientid=keyvaultref:$KEYVAULTURI/secrets/authentication-microsoft-clientid,identityref:$MANAGEDIDENTITYID \ -# msft-clientsecret=keyvaultref:$KEYVAULTURI/secrets/authentication-microsoft-clientsecret,identityref:$MANAGEDIDENTITYID emailsender-apikey=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-apikey,identityref:$MANAGEDIDENTITYID \ -# emailsender-secret=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-secretkey,identityref:$MANAGEDIDENTITYID emailsender-name=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-sendfromname,identityref:$MANAGEDIDENTITYID \ -# emailsender-email=keyvaultref:$KEYVAULTURI/secrets/authmessagesender-sendfromemail,identityref:$MANAGEDIDENTITYID connectionstring=keyvaultref:$KEYVAULTURI/secrets/connectionstrings-essentialcsharpwebcontextconnection,identityref:$MANAGEDIDENTITYID \ -# captcha-sitekey=keyvaultref:$KEYVAULTURI/secrets/captcha-sitekey,identityref:$MANAGEDIDENTITYID captcha-secretkey=keyvaultref:$KEYVAULTURI/secrets/captcha-secretkey,identityref:$MANAGEDIDENTITYID \ -# appinsights-connectionstring=keyvaultref:$KEYVAULTURI/secrets/applicationinsights-connectionstring,identityref:$MANAGEDIDENTITYID \ -# ai-endpoint=keyvaultref:$KEYVAULTURI/secrets/AIOptions--Endpoint,identityref:$MANAGEDIDENTITYID ai-apikey=keyvaultref:$KEYVAULTURI/secrets/AIOptions--ApiKey,identityref:$MANAGEDIDENTITYID \ -# ai-vectordeployment=keyvaultref:$KEYVAULTURI/secrets/AIOptions--VectorGenerationDeploymentName,identityref:$MANAGEDIDENTITYID ai-chatdeployment=keyvaultref:$KEYVAULTURI/secrets/AIOptions--ChatDeploymentName,identityref:$MANAGEDIDENTITYID \ -# ai-systemprompt=keyvaultref:$KEYVAULTURI/secrets/AIOptions--SystemPrompt,identityref:$MANAGEDIDENTITYID \ -# postgres-vectorstore-connectionstring=keyvaultref:$KEYVAULTURI/secrets/connectionstrings--PostgresVectorDb,identityref:$MANAGEDIDENTITYID -# az containerapp update --name $CONTAINER_APP_NAME --resource-group $RESOURCEGROUP --replace-env-vars Authentication__github__clientId=secretref:github-clientid Authentication__github__clientSecret=secretref:github-clientsecret \ -# Authentication__microsoft__clientId=secretref:msft-clientid Authentication__microsoft__clientSecret=secretref:msft-clientsecret AuthMessageSender__ApiKey=secretref:emailsender-apikey AuthMessageSender__SecretKey=secretref:emailsender-secret \ -# AuthMessageSender__SendFromName=secretref:emailsender-name AuthMessageSender__SendFromEmail=secretref:emailsender-email ConnectionStrings__EssentialCSharpWebContextConnection=secretref:connectionstring ASPNETCORE_ENVIRONMENT=Staging \ -# AZURE_CLIENT_ID=$AZURECLIENTID HCaptcha__SiteKey=secretref:captcha-sitekey HCaptcha__SecretKey=secretref:captcha-secretkey ApplicationInsights__ConnectionString=secretref:appinsights-connectionstring \ -# AIOptions__Endpoint=secretref:ai-endpoint AIOptions__ApiKey=secretref:ai-apikey AIOptions__VectorGenerationDeploymentName=secretref:ai-vectordeployment AIOptions__ChatDeploymentName=secretref:ai-chatdeployment \ -# AIOptions__SystemPrompt=secretref:ai-systemprompt ConnectionStrings__PostgresVectorStore=secretref:postgres-vectorstore-connectionstring - -# - name: Logout of Azure CLI -# if: always() -# uses: azure/CLI@v2 -# with: -# inlineScript: | -# az logout -# az cache purge -# az account clear \ No newline at end of file + path: ${{ github.workspace }}/tryimage.tar + + deploy-development: + if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request' + runs-on: ubuntu-latest + needs: build-and-test + environment: + name: "Development" + + steps: + - name: Azure Login + uses: azure/login@v2 + with: + client-id: ${{ secrets.ESSENTIALCSHARPDEV_CLIENT_ID }} + tenant-id: ${{ secrets.ESSENTIALCSHARP_APPIDENTITY_TENANT_ID }} + subscription-id: ${{ secrets.ESSENTIALCSHARP_SUBSCRIPTION_ID }} + + - name: Download artifact + uses: actions/download-artifact@v7 + with: + name: tryimage + path: ${{ github.workspace }} + + - name: Load image + run: | + docker load --input ${{ github.workspace }}/tryimage.tar + docker image ls -a + + - name: Log in to container registry + uses: azure/CLI@v2 + env: + ACR_NAME: ${{ vars.ACR_NAME }} + with: + inlineScript: | + az acr login --name $ACR_NAME + + - name: Push Image to Container Registry + run: docker push --all-tags ${{ vars.DEVCONTAINER_REGISTRY }}/try + + - name: Create and Deploy to Container App + uses: azure/CLI@v2 + env: + CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }} + RESOURCEGROUP: ${{ vars.RESOURCEGROUP }} + CONTAINER_REGISTRY: ${{ vars.DEVCONTAINER_REGISTRY }} + CONTAINER_APP_ENVIRONMENT: ${{ vars.CONTAINER_APP_ENVIRONMENT }} + IDENTITY_ID: ${{ secrets.IDENTITY_ID }} + with: + inlineScript: | + az config set extension.use_dynamic_install=yes_without_prompt + az containerapp up -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --image $CONTAINER_REGISTRY/try:${{ github.sha }} --environment $CONTAINER_APP_ENVIRONMENT --registry-server $CONTAINER_REGISTRY --ingress external --target-port 8080 --registry-identity + + - name: Logout of Azure CLI + if: always() + uses: azure/CLI@v2 + with: + inlineScript: | + az logout + az cache purge + az account clear \ No newline at end of file From 6dd3fe79316daac18af308c67bd00045e304ebd0 Mon Sep 17 00:00:00 2001 From: Joshua Lester Date: Fri, 9 Jan 2026 16:53:29 -0800 Subject: [PATCH 4/8] Refactor CI/CD workflow for improved Docker image handling and Azure deployment --- .github/workflows/Build-Test-And-Deploy.yaml | 34 +++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yaml b/.github/workflows/Build-Test-And-Deploy.yaml index 041fd8eb9..5db73a195 100644 --- a/.github/workflows/Build-Test-And-Deploy.yaml +++ b/.github/workflows/Build-Test-And-Deploy.yaml @@ -3,6 +3,8 @@ name: Build, Test, and Deploy Try .NET API on: push: branches: ["main"] + pull_request: + branches: ["main"] workflow_dispatch: permissions: @@ -62,11 +64,12 @@ jobs: tags: ${{ vars.DEVCONTAINER_REGISTRY }}/try:${{ github.sha }},${{ vars.DEVCONTAINER_REGISTRY }}/try:latest file: ./Dockerfile context: . - outputs: type=docker,dest=${{ github.workspace }}/try.tar + outputs: type=docker,dest=${{ github.workspace }}/tryimage.tar cache-from: type=gha cache-to: type=gha,mode=max - name: Upload artifact + if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request' uses: actions/upload-artifact@v6 with: name: tryimage @@ -84,7 +87,7 @@ jobs: uses: azure/login@v2 with: client-id: ${{ secrets.ESSENTIALCSHARPDEV_CLIENT_ID }} - tenant-id: ${{ secrets.ESSENTIALCSHARP_APPIDENTITY_TENANT_ID }} + tenant-id: ${{ secrets.ESSENTIALCSHARP_TENANT_ID }} subscription-id: ${{ secrets.ESSENTIALCSHARP_SUBSCRIPTION_ID }} - name: Download artifact @@ -101,26 +104,41 @@ jobs: - name: Log in to container registry uses: azure/CLI@v2 env: - ACR_NAME: ${{ vars.ACR_NAME }} + REGISTRY_URL: ${{ vars.DEVCONTAINER_REGISTRY }} with: inlineScript: | - az acr login --name $ACR_NAME + REGISTRY_NAME=${REGISTRY_URL%.azurecr.io} + az acr login --name $REGISTRY_NAME - name: Push Image to Container Registry - run: docker push --all-tags ${{ vars.DEVCONTAINER_REGISTRY }}/try + env: + REGISTRY_URL: ${{ vars.DEVCONTAINER_REGISTRY }} + run: docker push --all-tags $REGISTRY_URL/try - name: Create and Deploy to Container App uses: azure/CLI@v2 env: CONTAINER_APP_NAME: ${{ vars.CONTAINER_APP_NAME }} RESOURCEGROUP: ${{ vars.RESOURCEGROUP }} - CONTAINER_REGISTRY: ${{ vars.DEVCONTAINER_REGISTRY }} CONTAINER_APP_ENVIRONMENT: ${{ vars.CONTAINER_APP_ENVIRONMENT }} - IDENTITY_ID: ${{ secrets.IDENTITY_ID }} + REGISTRY_URL: ${{ vars.DEVCONTAINER_REGISTRY }} + SUBSCRIPTION_ID: ${{ secrets.ESSENTIALCSHARP_SUBSCRIPTION_ID }} + MANAGED_IDENTITY_ID: ${{ secrets.MANAGED_IDENTITY_ID }} with: inlineScript: | az config set extension.use_dynamic_install=yes_without_prompt - az containerapp up -n $CONTAINER_APP_NAME -g $RESOURCEGROUP --image $CONTAINER_REGISTRY/try:${{ github.sha }} --environment $CONTAINER_APP_ENVIRONMENT --registry-server $CONTAINER_REGISTRY --ingress external --target-port 8080 --registry-identity + az extension add --name containerapp --upgrade + az containerapp up \ + -n $CONTAINER_APP_NAME \ + -g $RESOURCEGROUP \ + --image $REGISTRY_URL/try:${{ github.sha }} \ + --environment $CONTAINER_APP_ENVIRONMENT \ + --registry-server $REGISTRY_URL \ + --ingress external \ + --target-port 8080 \ + --user-assigned /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCEGROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$MANAGED_IDENTITY_ID \ + --registry-identity /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCEGROUP/providers/Microsoft.ManagedIdentity/userAssignedIdentities/$MANAGED_IDENTITY_ID + - name: Logout of Azure CLI if: always() From ab82935375a3123f16fcad48b7a2f72cc29159af Mon Sep 17 00:00:00 2001 From: Joshua Lester <127695056+Joshua-Lester3@users.noreply.github.com> Date: Mon, 12 Jan 2026 11:13:50 -0800 Subject: [PATCH 5/8] Update .github/workflows/Build-Test-And-Deploy.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/Build-Test-And-Deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yaml b/.github/workflows/Build-Test-And-Deploy.yaml index 5db73a195..6a35cc3cf 100644 --- a/.github/workflows/Build-Test-And-Deploy.yaml +++ b/.github/workflows/Build-Test-And-Deploy.yaml @@ -104,7 +104,7 @@ jobs: - name: Log in to container registry uses: azure/CLI@v2 env: - REGISTRY_URL: ${{ vars.DEVCONTAINER_REGISTRY }} + REGISTRY_URL: ${{ vars.DEVCONTAINER_REGISTRY }} with: inlineScript: | REGISTRY_NAME=${REGISTRY_URL%.azurecr.io} From 57f498f54ecb3d3ec78d87490b5f5136b45f5b5e Mon Sep 17 00:00:00 2001 From: Joshua Lester Date: Mon, 12 Jan 2026 11:16:23 -0800 Subject: [PATCH 6/8] Remove errant space --- .github/workflows/Build-Test-And-Deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-Test-And-Deploy.yaml b/.github/workflows/Build-Test-And-Deploy.yaml index 6a35cc3cf..143e805c8 100644 --- a/.github/workflows/Build-Test-And-Deploy.yaml +++ b/.github/workflows/Build-Test-And-Deploy.yaml @@ -106,7 +106,7 @@ jobs: env: REGISTRY_URL: ${{ vars.DEVCONTAINER_REGISTRY }} with: - inlineScript: | + inlineScript: | REGISTRY_NAME=${REGISTRY_URL%.azurecr.io} az acr login --name $REGISTRY_NAME From a7367bc2894089cb1b8ce77961d192c333e07010 Mon Sep 17 00:00:00 2001 From: Joshua Lester <127695056+Joshua-Lester3@users.noreply.github.com> Date: Wed, 14 Jan 2026 15:47:05 -0800 Subject: [PATCH 7/8] Update global.json Co-authored-by: Kevin B --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 1904e310b..68f9c1d13 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { "version": "10.0.100", - "allowPrerelease": true, + "allowPrerelease": false, "rollForward": "latestMinor" }, "tools": { From a273a2bab815520794e8d28a36942fcaaffd0b88 Mon Sep 17 00:00:00 2001 From: Joshua Lester Date: Wed, 14 Jan 2026 15:48:27 -0800 Subject: [PATCH 8/8] remove azure pipelines workflows --- azure-pipelines-CI.yml | 191 ----------------------------------------- azure-pipelines.yml | 156 --------------------------------- 2 files changed, 347 deletions(-) delete mode 100644 azure-pipelines-CI.yml delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines-CI.yml b/azure-pipelines-CI.yml deleted file mode 100644 index 8c4136f19..000000000 --- a/azure-pipelines-CI.yml +++ /dev/null @@ -1,191 +0,0 @@ -# azure-pipelines-CI.yml -parameters: -- name: SkipTests - displayName: Skip Tests - type: boolean - default: false - -# CI and PR triggers -trigger: -- main -- feature/* -- release/* -pr: -- main -- feature/* -- release/* - -resources: - repositories: - - repository: 1esPipelines - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release - -variables: -- template: /eng/common/templates/variables/pool-providers.yml@self -- template: /eng/templates/variables-template.yml@self -- name: additionalWindowsArgs - value: '' -- name: additionalLinuxArgs - value: '' - -extends: - # The pipeline extends the 1ES PT which will inject different SDL and compliance tasks. - # For non-production pipelines, use "Unofficial" as defined below. - # For productions pipelines, use "Official". - template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines - parameters: - # Update the pool with your team's 1ES hosted pool. - pool: - name: $(DncEngInternalBuildPool) # Name of your hosted pool - image: 1es-windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used - os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS - - # Build Tags - customBuildTags: - - TryDotNet - - $(Build.BuildNumber) - - sdl: - git: - longpaths: true - tsa: - enabled: true - config: - repositoryName: 'dotnet-try' - codebaseName: 'dotnet-try' - instanceUrl: 'https://devdiv.visualstudio.com/' - projectName: 'DEVDIV' - iterationPath: 'DevDiv\\Future Backlog' - areaPath: 'DevDiv\\NET Developer Experience\\VS Testing\\Interactive' - notificationAliases: ['dotnetInteractive@microsoft.com'] - serviceTreeID: 'ab4d58de-beb3-4714-866c-1b46a48ea002' - allTools: true - policheck: - enabled: true - credscan: - enabled: true - suppressionsFile: $(Build.SourcesDirectory)/.config/credscan/Suppressions.json - - stages: - - stage: build - displayName: Build and Test - jobs: - - template: /eng/common/templates-official/jobs/jobs.yml@self - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: true - enablePublishBuildAssets: true - enablePublishUsingPipelines: $(_PublishUsingPipelines) - jobs: - - job: Windows_NT - pool: - # TODO: Can we use latest or equivalent? - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals 1es-windows-2022 - os: windows - templateContext: - # This enables SDL scanning to be run once across all artifacts - outputParentDirectory: $(Build.SourcesDirectory)/artifacts - outputs: - - output: pipelineArtifact - targetPath: $(Build.SourcesDirectory)/artifacts - artifactName: Windows_artifacts - displayName: Publish Windows artifacts - condition: always() - - variables: - - name: TRYDOTNET_PREBUILDS_PATH - value: $(Build.SourcesDirectory)\artifacts\trydotnet-prebuilds - - name: POCKETLOGGER_LOG_PATH - value: $(Build.SourcesDirectory)\artifacts\logs\pocketlogger.log - - name: RunIntegrationTests - value: true - # Enable signing for internal, non-PR builds - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Symbol-Server-Pats - - name: _SignType - value: Real - - name: _DotNetPublishToBlobFeed - value: false - - name: _BuildArgs - value: /p:SignType=$(_SignType) - /p:DotNetSignType=$(_SignType) - /p:MicroBuild_SigningEnabled=true - /p:OverridePackageSource=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json - /p:TeamName=$(_TeamName) - /p:DotNetPublishToBlobFeed=false - /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - # else - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - name: _SignType - value: Test - - name: _BuildArgs - value: /p:SignType=$(_SignType) - steps: - - task: UseDotNet@2 - displayName: Install SDK 10.0.100 - inputs: - packageType: sdk - version: 10.0.100 - - template: /eng/templates/build-and-test-job-windows-templates.yml@self - parameters: - buildConfig: $(_BuildConfig) - skipTests: $(SkipTests) - buildArgs: $(_BuildArgs) - additionalArgs: $(additionalWindowsArgs) - - template: /eng/common/templates-official/jobs/jobs.yml@self - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: true - enablePublishBuildAssets: false - enablePublishUsingPipelines: false - jobs: - - job: Linux - pool: - name: $(DncEngInternalBuildPool) - os: linux - demands: ImageOverride -equals 1es-mariner-2 - templateContext: - # This enables SDL scanning to be run once across all artifacts - outputParentDirectory: $(Build.SourcesDirectory)/artifacts - outputs: - - output: pipelineArtifact - targetPath: $(Build.SourcesDirectory)/artifacts - artifactName: Linux_artifacts - displayName: Publish Linux artifacts - condition: always() - variables: - - name: TRYDOTNET_PREBUILDS_PATH - value: $(Build.SourcesDirectory)/artifacts/trydotnet-prebuilds - - name: POCKETLOGGER_LOG_PATH - value: $(Build.SourcesDirectory)/artifacts/logs/pocketlogger.log - # Enable signing for internal, non-PR builds - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _SignType - value: Test - - name: _BuildArgs - value: /p:SignType=$(_SignType) - /p:DotNetSignType=$(_SignType) - /p:OverridePackageSource=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json - /p:TeamName=$(_TeamName) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - # else - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - name: _SignType - value: Test - - name: _BuildArgs - value: /p:SignType=$(_SignType) - steps: - - template: /eng/templates/build-and-test-job-linux-templates.yml@self - parameters: - buildConfig: $(_BuildConfig) - skipTests: $(SkipTests) - additionalArgs: $(additionalLinuxArgs) diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 7ab91eaca..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,156 +0,0 @@ -# azure-pipelines.yml -parameters: -- name: SkipTests - displayName: Skip Tests - type: boolean - default: false - -# CI and PR triggers -trigger: -- main -- feature/* -- release/* -pr: -- main -- feature/* -- release/* - -variables: - - template: /eng/templates/variables-template.yml@self - - name: system.debug - value: true - - name: additionalWindowsArgs - value: '--diag $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/diag.txt -p:m=1' - - name: additionalLinuxArgs - value: '--diag $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/diag.txt' - -stages: -- stage: build - displayName: Build and Test - jobs: - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: true - enablePublishBuildAssets: true - enablePublishUsingPipelines: $(_PublishUsingPipelines) - jobs: - - job: Windows_NT - pool: - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCore-Public - demands: ImageOverride -equals windows.vs2022.amd64.open - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2022.amd64 - variables: - - name: RunIntegrationTests - value: true - - name: TRYDOTNET_PREBUILDS_PATH - value: $(Build.SourcesDirectory)\artifacts\trydotnet-prebuilds - - name: POCKETLOGGER_LOG_PATH - value: $(Build.SourcesDirectory)\artifacts\logs\pocketlogger.log - # Enable signing for internal, non-PR builds - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-Symbol-Server-Pats - - name: _SignType - value: Real - - name: _DotNetPublishToBlobFeed - value: false - - name: _BuildArgs - value: /p:SignType=$(_SignType) - /p:DotNetSignType=$(_SignType) - /p:MicroBuild_SigningEnabled=true - /p:OverridePackageSource=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json - /p:TeamName=$(_TeamName) - /p:DotNetPublishToBlobFeed=false - /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - # else - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - name: _SignType - value: Test - - name: _BuildArgs - value: /p:SignType=$(_SignType) - steps: - - task: UseDotNet@2 - displayName: Install SDK 10.0.100 - inputs: - packageType: sdk - version: 10.0.100 - - template: /eng/templates/build-and-test-job-windows-templates.yml@self - parameters: - buildConfig: $(_BuildConfig) - skipTests: $(SkipTests) - buildArgs: $(_BuildArgs) - additionalArgs: $(additionalWindowsArgs) - - task: PublishBuildArtifacts@1 - displayName: Publish Windows artifacts - inputs: - pathToPublish: $(Build.SourcesDirectory)/artifacts/ - artifactName: Windows_artifacts - artifactType: container - condition: always() - - - template: /eng/common/templates/jobs/jobs.yml - parameters: - enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishTestResults: true - enablePublishBuildAssets: false - enablePublishUsingPipelines: false - jobs: - - job: Linux - pool: - vmImage: ubuntu-22.04 - variables: - - name: TRYDOTNET_PREBUILDS_PATH - value: $(Build.SourcesDirectory)/artifacts/trydotnet-prebuilds - - name: POCKETLOGGER_LOG_PATH - value: $(Build.SourcesDirectory)/artifacts/logs/pocketlogger.log - # Enable signing for internal, non-PR builds - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - name: _SignType - value: Test - - name: _BuildArgs - value: /p:SignType=$(_SignType) - /p:DotNetSignType=$(_SignType) - /p:OverridePackageSource=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json - /p:TeamName=$(_TeamName) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - # else - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - - name: _SignType - value: Test - - name: _BuildArgs - value: /p:SignType=$(_SignType) - steps: - - template: /eng/templates/build-and-test-job-linux-templates.yml@self - parameters: - buildConfig: $(_BuildConfig) - skipTests: $(SkipTests) - additionalArgs: $(additionalLinuxArgs) - - - task: PublishBuildArtifacts@1 - displayName: Publish Linux artifacts - inputs: - pathToPublish: $(Build.SourcesDirectory)/artifacts/ - artifactName: Linux_artifacts - artifactType: container - condition: always() - -#---------------------------------------------------------------------------------------------------------------------# -# Post Build # -#---------------------------------------------------------------------------------------------------------------------# -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: eng/common/templates/post-build/post-build.yml - parameters: - publishingInfraVersion: 3 - # Symbol validation is not entirely reliable as of yet, so should be turned off until https://github.com/dotnet/arcade/issues/2871 is resolved. - enableSymbolValidation: false - # SourceLink improperly looks for generated files. See https://github.com/dotnet/arcade/issues/3069 - enableSourceLinkValidation: false