From 82c1fe1c0ef1ea06d7d9c6f99af2195dfbd1abe5 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 28 Jan 2025 19:55:52 +0300 Subject: [PATCH 01/24] Task: Bootstrap acr-push pipeline --- .azure-pipelines/acr-push.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .azure-pipelines/acr-push.yml diff --git a/.azure-pipelines/acr-push.yml b/.azure-pipelines/acr-push.yml new file mode 100644 index 00000000000..5ca954c8c75 --- /dev/null +++ b/.azure-pipelines/acr-push.yml @@ -0,0 +1,35 @@ +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) + +trigger: + branches: + include: + - dev + +pr: none + +variables: + buildConfiguration: 'Release' + buildPlatform: 'Any CPU' + +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + vmImage: windows-latest + stages: + - stage: Build + jobs: + - job: build + steps: + - task: UseDotNet@2 + displayName: 'Use .NET 8' + inputs: + version: 8.x \ No newline at end of file From 772b7ba24b9826f5e8884a8d458503c9a96d84f4 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Mon, 3 Mar 2025 18:35:03 +0300 Subject: [PATCH 02/24] Test ACR push --- .azure-pipelines/ci-build.yml | 215 +++++++++------------------------- 1 file changed, 57 insertions(+), 158 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 8a894c17836..a4bbee91a8f 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -1,162 +1,61 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. -name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) -parameters: -- name: BuildAgent - default: 1es-windows-ps-compute-m - displayName: Build Agent -- name: Test - type: boolean - default: true -- name: Pack - type: boolean - default: true -- name: Sign - type: boolean - default: true -- name: InternalFeed - type: string - default: '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build' - displayName: Internal NuGet Feed - values: - - '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_v2' - - 'ATPopFeed' - - '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build' - -variables: - BuildAgent: ${{ parameters.BuildAgent }} - GitUserEmail: "GraphTooling@service.microsoft.com" - GitUserName: "Microsoft Graph DevX Tooling" - +# azure-pipelines.yml trigger: branches: include: - - main - - dev -pr: - branches: + - task/migrate-acr-push-pipeline + - main + paths: include: - - main - - dev -resources: - repositories: - - repository: 1ESPipelineTemplates - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release -extends: - template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates - parameters: - pool: $(BuildAgent) - sdl: - binskim: - enabled: false - justificationForDisabling: "Binskim keeps on crushing and failing the weekly build pipeline. Disabling it for now because we are unable to publish the artifacts to internal feeds." - credscan: - suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/config/credscan/credscan-suppressions.json - policheck: - exclusionFile: $(Build.SourcesDirectory)/.azure-pipelines/config/policheck/policheck-exclusions.xml - customBuildTags: - - ES365AIMigrationTooling - stages: - - stage: stage - jobs: - - job: MsGraphPsSdkCiBuild - displayName: Microsoft Graph PowerShell SDK CI Build - timeoutInMinutes: 840 - templateContext: - outputs: - - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }}: - - output: pipelineArtifact - displayName: 'Publish Module Artifacts' - targetPath: '$(Build.ArtifactStagingDirectory)' - artifactName: 'drop' - publishLocation: 'Container' - steps: - - script: | - git submodule update --init --recursive - - template: .azure-pipelines/common-templates/install-tools.yml@self - - template: .azure-pipelines/common-templates/security-pre-checks.yml@self - - - template: .azure-pipelines/generation-templates/authentication-module.yml@self - parameters: - Test: ${{ parameters.Test }} - Pack: ${{ parameters.Pack }} - Sign: ${{ parameters.Sign }} - - - template: .azure-pipelines/generation-templates/workload-modules.yml@self - parameters: - Test: ${{ parameters.Test }} - Pack: ${{ parameters.Pack }} - Sign: ${{ parameters.Sign }} - - - template: .azure-pipelines/generation-templates/meta-module.yml@self - parameters: - Test: ${{ parameters.Test }} - Pack: ${{ parameters.Pack }} - Sign: ${{ parameters.Sign }} - - - template: .azure-pipelines/common-templates/guardian-analyzer.yml@self - - - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }}: - - template: .azure-pipelines/common-templates/esrp/codesign-nuget.yml@self - parameters: - FolderPath: "$(Build.ArtifactStagingDirectory)" - Pattern: "Microsoft.Graph*.nupkg" - - - template: .azure-pipelines/common-templates/security-post-checks.yml@self - - stage: 'Deploy_to_Internal_Feed' - dependsOn: stage - jobs: - - deployment: 'DeployToInternalFeed' - displayName: 'Deploy to Internal Feed' - environment: 'PowerShellInternalFeed' - strategy: - runOnce: - deploy: - steps: - - checkout: self - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build Artifacts' - inputs: - buildType: 'current' - targetPath: '$(System.DefaultWorkingDirectory)' - - task: 1ES.PublishNuget@1 - displayName: 'Publish NuGet to feed' - inputs: - useDotNetTask: false - packageParentPath: '$(System.DefaultWorkingDirectory)' - packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg' - publishVstsFeed: ${{ parameters.InternalFeed }} - nuGetFeedType: internal - allowPackageConflicts: true - - stage: 'Deploy_to_PsGallery' - dependsOn: stage - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Only deploy to PSGallery on main branch - jobs: - - deployment: 'DeployToPowerShellGallery' - displayName: 'Deploy to PowerShell Gallery' - environment: 'PowerShellGallery' - strategy: - runOnce: - deploy: - steps: - - checkout: self - - task: DownloadPipelineArtifact@2 - displayName: 'Download Build Artifacts' - inputs: - buildType: 'current' - targetPath: '$(System.DefaultWorkingDirectory)' - - task: 1ES.PublishNuget@1 - displayName: 'Publish NuGet to feed' - inputs: - useDotNetTask: false - packageParentPath: '$(System.DefaultWorkingDirectory)' - packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg' - nuGetFeedType: external - publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' - - - - - \ No newline at end of file + - src/** + - ./azure-pipelines/** + tags: + include: + - v* + +variables: + REGISTRY: 'msgraphpperegistry.azurecr.io' + IMAGE_NAME: 'public/microsoftgraph/powershell' + PREVIEW_BRANCH: 'refs/heads/task/migrate-acr-push-pipeline' # Updated to target your branch + vmImageName: 'ubuntu-latest' + + +stages: +- stage: PushToRegistry + displayName: 'Push docker image' + jobs: + - job: PushDockerImage + displayName: 'Push docker image' + pool: + vmImage: 'ubuntu-latest' + steps: + - checkout: self + + - task: AzureCLI@2 + displayName: "Log in to Azure Container Registry" + inputs: + azureSubscription: 'ACR Push Test' # service connection + scriptType: 'bash' + scriptLocation: 'inlineScript' + 'inlineScript': | + az acr login --name $(REGISTRY) + + - powershell: | + $version = $Env:BUILD_SOURCEBRANCH.replace("refs/tags/", "") + Write-Output "##vso[task.setvariable variable=version]$version" + displayName: 'Get truncated run number' + + - bash: | + echo "##vso[task.setvariable variable=version]$(version)" + displayName: 'Set version variable' + + - bash: | + echo "Building docker images" + docker build \ + -t $(REGISTRY)/$(IMAGE_NAME):latest \ + -t $(REGISTRY)/$(IMAGE_NAME):$(version) \ + "$(Build.SourceDirectory)" + + echo "Pushing docker images" + docker push $(REGISTRY)/$(IMAGE_NAME):latest + docker push $(REGISTRY)/$(IMAGE_NAME):$(version) + displayName: 'Build and push docker images' \ No newline at end of file From 2f5076d9450e930e6e90d20db726e8b4cfda9fdd Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Mon, 3 Mar 2025 18:36:03 +0300 Subject: [PATCH 03/24] Merge branch 'dev' into task/migrate-acr-push-pipeline From ce54d86ac17ecdd55859ee22824f41c9e82f63ad Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 13:23:18 +0300 Subject: [PATCH 04/24] Use date and runnumber for versioning --- .azure-pipelines/ci-build.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index a4bbee91a8f..28991f99488 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -38,24 +38,47 @@ stages: scriptLocation: 'inlineScript' 'inlineScript': | az acr login --name $(REGISTRY) - + - powershell: | + $date = Get-Date -Format "yyyyMMdd" + Write-Host "##vso[task.setvariable variable=currentDate]$date" + - powershell: | $version = $Env:BUILD_SOURCEBRANCH.replace("refs/tags/", "") Write-Output "##vso[task.setvariable variable=version]$version" displayName: 'Get truncated run number' + # Version information is not available in .csproj projects + # - bash: | + # echo "##vso[task.setvariable variable=version]$(version)" + # displayName: 'Set version variable' + - bash: | - echo "##vso[task.setvariable variable=version]$(version)" - displayName: 'Set version variable' + echo "Build Number: $(Build.BuildNumber)" + # Extract the last 3 characters for the run number + runnumber=$(echo "$(Build.BuildNumber)" | grep -o '[0-9]\+$') + echo "Extracted Run Number: $runnumber" + + # If extraction fails, set a default + if [ -z "$runnumber" ]; then + echo "Extraction failed, using default value" + runnumber=$(date +"%S%N" | cut -c1-3) + echo "Generated fallback run number: $runnumber" + fi + + # Set the variable for later steps + echo "##vso[task.setvariable variable=RUNNUMBER]$runnumber" + echo "##vso[task.setvariable variable=RUNNUMBER;isOutput=true]$runnumber" + displayName: 'Get truncated run number' + name: getrunnumber - bash: | echo "Building docker images" docker build \ -t $(REGISTRY)/$(IMAGE_NAME):latest \ - -t $(REGISTRY)/$(IMAGE_NAME):$(version) \ + -t $(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER \ "$(Build.SourceDirectory)" echo "Pushing docker images" docker push $(REGISTRY)/$(IMAGE_NAME):latest - docker push $(REGISTRY)/$(IMAGE_NAME):$(version) + docker push $(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER displayName: 'Build and push docker images' \ No newline at end of file From e4291f748b6372b7a65ef1b0f96afa0f4d3153ac Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 13:32:19 +0300 Subject: [PATCH 05/24] Remove source directory ref --- .azure-pipelines/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 28991f99488..58b709f357a 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -76,7 +76,7 @@ stages: docker build \ -t $(REGISTRY)/$(IMAGE_NAME):latest \ -t $(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER \ - "$(Build.SourceDirectory)" + . echo "Pushing docker images" docker push $(REGISTRY)/$(IMAGE_NAME):latest From 21ca1192d2ba865c464757f783c5b7021c933a5f Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 13:46:15 +0300 Subject: [PATCH 06/24] List content of source directory --- .azure-pipelines/ci-build.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 58b709f357a..bf3cc7f84ff 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -4,10 +4,7 @@ trigger: include: - task/migrate-acr-push-pipeline - main - paths: - include: - - src/** - - ./azure-pipelines/** + tags: include: - v* @@ -29,6 +26,12 @@ stages: vmImage: 'ubuntu-latest' steps: - checkout: self + + # Display the contents of the Build.SourceDirectory + - bash: | + echo "Build.SourceDirectory: $(Build.SourceDirectory)" + ls -la $(Build.SourceDirectory) + displayName: 'List contents of Build.SourceDirectory' - task: AzureCLI@2 displayName: "Log in to Azure Container Registry" @@ -50,8 +53,8 @@ stages: # Version information is not available in .csproj projects # - bash: | # echo "##vso[task.setvariable variable=version]$(version)" - # displayName: 'Set version variable' - + # displayName: 'Set version variable + - bash: | echo "Build Number: $(Build.BuildNumber)" # Extract the last 3 characters for the run number @@ -76,7 +79,7 @@ stages: docker build \ -t $(REGISTRY)/$(IMAGE_NAME):latest \ -t $(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER \ - . + $(Build.SourceDirectory) echo "Pushing docker images" docker push $(REGISTRY)/$(IMAGE_NAME):latest From 66cad8fdc54a983fac6d03484cade4576b574f5d Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 13:53:17 +0300 Subject: [PATCH 07/24] Wrap variables in quotes --- .azure-pipelines/ci-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index bf3cc7f84ff..9c4fad607ce 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -77,11 +77,11 @@ stages: - bash: | echo "Building docker images" docker build \ - -t $(REGISTRY)/$(IMAGE_NAME):latest \ - -t $(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER \ - $(Build.SourceDirectory) + -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ + -t "$(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER" \ + "$(Build.SourceDirectory)" echo "Pushing docker images" - docker push $(REGISTRY)/$(IMAGE_NAME):latest - docker push $(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER + docker push "$(REGISTRY)/$(IMAGE_NAME):latest" + docker push "$(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER" displayName: 'Build and push docker images' \ No newline at end of file From 15062358e7341c6d5ee87730c176751658e8c0b9 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 13:59:59 +0300 Subject: [PATCH 08/24] Fix build directory --- .azure-pipelines/ci-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 9c4fad607ce..43ac0b9baee 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -27,11 +27,11 @@ stages: steps: - checkout: self - # Display the contents of the Build.SourceDirectory + # Display the contents of the Build.SourcesDirectory - bash: | - echo "Build.SourceDirectory: $(Build.SourceDirectory)" - ls -la $(Build.SourceDirectory) - displayName: 'List contents of Build.SourceDirectory' + echo "Build.SourcesDirectory: $(Build.SourcesDirectory)" + ls -la $(Build.SourcesDirectory) + displayName: 'List contents of Build.SourcesDirectory' - task: AzureCLI@2 displayName: "Log in to Azure Container Registry" @@ -79,7 +79,7 @@ stages: docker build \ -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ -t "$(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER" \ - "$(Build.SourceDirectory)" + "$(Build.SourcesDirectory)" echo "Pushing docker images" docker push "$(REGISTRY)/$(IMAGE_NAME):latest" From 6059f5811703c1d227c7aea0cf81ba1ed3cc0752 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 14:08:31 +0300 Subject: [PATCH 09/24] Fix date --- .azure-pipelines/ci-build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 43ac0b9baee..becee8a69ab 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -76,12 +76,14 @@ stages: - bash: | echo "Building docker images" + # Format the date to be compatible with Docker tags + formatted_date=$(date +"%Y%m%d%H%M%S") docker build \ -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ - -t "$(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER" \ + -t "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" \ "$(Build.SourcesDirectory)" - + echo "Pushing docker images" docker push "$(REGISTRY)/$(IMAGE_NAME):latest" - docker push "$(REGISTRY)/$(IMAGE_NAME):$(date).$RUNNUMBER" + docker push "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" displayName: 'Build and push docker images' \ No newline at end of file From 0bdb67213ce445baccbcc476f32de3d79e90a5a6 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 14:25:03 +0300 Subject: [PATCH 10/24] Use platform build --- .azure-pipelines/ci-build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index becee8a69ab..297e182b962 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -78,12 +78,10 @@ stages: echo "Building docker images" # Format the date to be compatible with Docker tags formatted_date=$(date +"%Y%m%d%H%M%S") - docker build \ + docker buildx build \ + --platform linux/amd64,linux/arm64/v8,linux/arm/v7 \ + --push \ -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ -t "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" \ "$(Build.SourcesDirectory)" - - echo "Pushing docker images" - docker push "$(REGISTRY)/$(IMAGE_NAME):latest" - docker push "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" displayName: 'Build and push docker images' \ No newline at end of file From 482c666701d1583cdcf7b7cbdd8cfd84df080ad3 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 14:31:15 +0300 Subject: [PATCH 11/24] Set up buildx --- .azure-pipelines/ci-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 297e182b962..7c0b5db2c3f 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -45,6 +45,18 @@ stages: $date = Get-Date -Format "yyyyMMdd" Write-Host "##vso[task.setvariable variable=currentDate]$date" + - script: | + docker run --privileged --rm tonistiigi/binfmt --install all + displayName: 'Enable multi-platform builds' + + - script: | + docker buildx create --use --name mybuilder + displayName: 'Set up Docker BuildX' + + - script: | + docker buildx inspect --bootstrap + displayName: 'Ensure BuildX is working' + - powershell: | $version = $Env:BUILD_SOURCEBRANCH.replace("refs/tags/", "") Write-Output "##vso[task.setvariable variable=version]$version" From c13c6d7ef3db2782c95cc175839e7a55d886ee8b Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 14:37:41 +0300 Subject: [PATCH 12/24] Only build for linux amd64 --- .azure-pipelines/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 7c0b5db2c3f..4e271490d50 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -91,7 +91,7 @@ stages: # Format the date to be compatible with Docker tags formatted_date=$(date +"%Y%m%d%H%M%S") docker buildx build \ - --platform linux/amd64,linux/arm64/v8,linux/arm/v7 \ + --platform linux/amd64 \ --push \ -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ -t "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" \ From 26a14c11319f95c8406bac26aa7f2b77b336cb1f Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 14:58:41 +0300 Subject: [PATCH 13/24] Add docker build stage --- .azure-pipelines/ci-build.yml | 320 ++++++++++++++++++++++++---------- 1 file changed, 232 insertions(+), 88 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 4e271490d50..de022fdd354 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -1,99 +1,243 @@ -# azure-pipelines.yml +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) +parameters: +- name: BuildAgent + default: 1es-windows-ps-compute-m + displayName: Build Agent +- name: Test + type: boolean + default: true +- name: Pack + type: boolean + default: true +- name: Sign + type: boolean + default: true +- name: InternalFeed + type: string + default: '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build' + displayName: Internal NuGet Feed + values: + - '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_v2' + - 'ATPopFeed' + - '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build' + +variables: + BuildAgent: ${{ parameters.BuildAgent }} + GitUserEmail: "GraphTooling@service.microsoft.com" + GitUserName: "Microsoft Graph DevX Tooling" + REGISTRY: 'msgraphpperegistry.azurecr.io' + IMAGE_NAME: 'public/microsoftgraph/powershell' + PREVIEW_BRANCH: 'refs/heads/task/migrate-acr-push-pipeline' # Updated to target your branch + trigger: branches: include: - - task/migrate-acr-push-pipeline - - main - + - main + - dev tags: include: - v* - -variables: - REGISTRY: 'msgraphpperegistry.azurecr.io' - IMAGE_NAME: 'public/microsoftgraph/powershell' - PREVIEW_BRANCH: 'refs/heads/task/migrate-acr-push-pipeline' # Updated to target your branch - vmImageName: 'ubuntu-latest' - - -stages: -- stage: PushToRegistry - displayName: 'Push docker image' - jobs: - - job: PushDockerImage - displayName: 'Push docker image' - pool: - vmImage: 'ubuntu-latest' - steps: - - checkout: self - # Display the contents of the Build.SourcesDirectory - - bash: | - echo "Build.SourcesDirectory: $(Build.SourcesDirectory)" - ls -la $(Build.SourcesDirectory) - displayName: 'List contents of Build.SourcesDirectory' - - - task: AzureCLI@2 - displayName: "Log in to Azure Container Registry" - inputs: - azureSubscription: 'ACR Push Test' # service connection - scriptType: 'bash' - scriptLocation: 'inlineScript' - 'inlineScript': | - az acr login --name $(REGISTRY) - - powershell: | - $date = Get-Date -Format "yyyyMMdd" - Write-Host "##vso[task.setvariable variable=currentDate]$date" +pr: + branches: + include: + - main + - dev +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: $(BuildAgent) + sdl: + binskim: + enabled: false + justificationForDisabling: "Binskim keeps on crushing and failing the weekly build pipeline. Disabling it for now because we are unable to publish the artifacts to internal feeds." + credscan: + suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/config/credscan/credscan-suppressions.json + policheck: + exclusionFile: $(Build.SourcesDirectory)/.azure-pipelines/config/policheck/policheck-exclusions.xml + customBuildTags: + - ES365AIMigrationTooling + stages: + - stage: stage + jobs: + - job: MsGraphPsSdkCiBuild + displayName: Microsoft Graph PowerShell SDK CI Build + timeoutInMinutes: 840 + templateContext: + outputs: + - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }}: + - output: pipelineArtifact + displayName: 'Publish Module Artifacts' + targetPath: '$(Build.ArtifactStagingDirectory)' + artifactName: 'drop' + publishLocation: 'Container' + steps: + - script: | + git submodule update --init --recursive + - template: .azure-pipelines/common-templates/install-tools.yml@self + - template: .azure-pipelines/common-templates/security-pre-checks.yml@self + + - template: .azure-pipelines/generation-templates/authentication-module.yml@self + parameters: + Test: ${{ parameters.Test }} + Pack: ${{ parameters.Pack }} + Sign: ${{ parameters.Sign }} - - script: | - docker run --privileged --rm tonistiigi/binfmt --install all - displayName: 'Enable multi-platform builds' - - - script: | - docker buildx create --use --name mybuilder - displayName: 'Set up Docker BuildX' - - - script: | - docker buildx inspect --bootstrap - displayName: 'Ensure BuildX is working' + - template: .azure-pipelines/generation-templates/workload-modules.yml@self + parameters: + Test: ${{ parameters.Test }} + Pack: ${{ parameters.Pack }} + Sign: ${{ parameters.Sign }} - - powershell: | - $version = $Env:BUILD_SOURCEBRANCH.replace("refs/tags/", "") - Write-Output "##vso[task.setvariable variable=version]$version" - displayName: 'Get truncated run number' - - # Version information is not available in .csproj projects - # - bash: | - # echo "##vso[task.setvariable variable=version]$(version)" - # displayName: 'Set version variable - - - bash: | - echo "Build Number: $(Build.BuildNumber)" - # Extract the last 3 characters for the run number - runnumber=$(echo "$(Build.BuildNumber)" | grep -o '[0-9]\+$') - echo "Extracted Run Number: $runnumber" + - template: .azure-pipelines/generation-templates/meta-module.yml@self + parameters: + Test: ${{ parameters.Test }} + Pack: ${{ parameters.Pack }} + Sign: ${{ parameters.Sign }} + + - template: .azure-pipelines/common-templates/guardian-analyzer.yml@self + + - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }}: + - template: .azure-pipelines/common-templates/esrp/codesign-nuget.yml@self + parameters: + FolderPath: "$(Build.ArtifactStagingDirectory)" + Pattern: "Microsoft.Graph*.nupkg" + + - template: .azure-pipelines/common-templates/security-post-checks.yml@self + - stage: 'Deploy_to_Internal_Feed' + dependsOn: stage + jobs: + - deployment: 'DeployToInternalFeed' + displayName: 'Deploy to Internal Feed' + environment: 'PowerShellInternalFeed' + strategy: + runOnce: + deploy: + steps: + - checkout: self + - task: DownloadPipelineArtifact@2 + displayName: 'Download Build Artifacts' + inputs: + buildType: 'current' + targetPath: '$(System.DefaultWorkingDirectory)' + - task: 1ES.PublishNuget@1 + displayName: 'Publish NuGet to feed' + inputs: + useDotNetTask: false + packageParentPath: '$(System.DefaultWorkingDirectory)' + packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg' + publishVstsFeed: ${{ parameters.InternalFeed }} + nuGetFeedType: internal + allowPackageConflicts: true + - stage: 'Deploy_to_PsGallery' + dependsOn: stage + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Only deploy to PSGallery on main branch + jobs: + - deployment: 'DeployToPowerShellGallery' + displayName: 'Deploy to PowerShell Gallery' + environment: 'PowerShellGallery' + strategy: + runOnce: + deploy: + steps: + - checkout: self + - task: DownloadPipelineArtifact@2 + displayName: 'Download Build Artifacts' + inputs: + buildType: 'current' + targetPath: '$(System.DefaultWorkingDirectory)' + - task: 1ES.PublishNuget@1 + displayName: 'Publish NuGet to feed' + inputs: + useDotNetTask: false + packageParentPath: '$(System.DefaultWorkingDirectory)' + packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg' + nuGetFeedType: external + publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' + + - stage: PushDockerImageToRegistry + condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) + displayName: 'Push docker image' + jobs: + - job: PushDockerImage + displayName: 'Push docker image' + pool: + vmImage: 'ubuntu-latest' + steps: + - checkout: self + + # Display the contents of the Build.SourcesDirectory + - bash: | + echo "Build.SourcesDirectory: $(Build.SourcesDirectory)" + ls -la $(Build.SourcesDirectory) + displayName: 'List contents of Build.SourcesDirectory' + + - task: AzureCLI@2 + displayName: "Log in to Azure Container Registry" + inputs: + azureSubscription: 'ACR Push Test' # service connection + scriptType: 'bash' + scriptLocation: 'inlineScript' + 'inlineScript': | + az acr login --name $(REGISTRY) + - powershell: | + $date = Get-Date -Format "yyyyMMdd" + Write-Host "##vso[task.setvariable variable=currentDate]$date" + + - script: | + docker run --privileged --rm tonistiigi/binfmt --install all + displayName: 'Enable multi-platform builds' - # If extraction fails, set a default - if [ -z "$runnumber" ]; then - echo "Extraction failed, using default value" - runnumber=$(date +"%S%N" | cut -c1-3) - echo "Generated fallback run number: $runnumber" - fi + - script: | + docker buildx create --use --name mybuilder + displayName: 'Set up Docker BuildX' - # Set the variable for later steps - echo "##vso[task.setvariable variable=RUNNUMBER]$runnumber" - echo "##vso[task.setvariable variable=RUNNUMBER;isOutput=true]$runnumber" - displayName: 'Get truncated run number' - name: getrunnumber - - - bash: | - echo "Building docker images" - # Format the date to be compatible with Docker tags - formatted_date=$(date +"%Y%m%d%H%M%S") - docker buildx build \ - --platform linux/amd64 \ - --push \ - -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ - -t "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" \ - "$(Build.SourcesDirectory)" - displayName: 'Build and push docker images' \ No newline at end of file + - script: | + docker buildx inspect --bootstrap + displayName: 'Ensure BuildX is working' + + - powershell: | + $version = $Env:BUILD_SOURCEBRANCH.replace("refs/tags/", "") + Write-Output "##vso[task.setvariable variable=version]$version" + displayName: 'Get truncated run number' + + - bash: | + echo "Build Number: $(Build.BuildNumber)" + # Extract the last 3 characters for the run number + runnumber=$(echo "$(Build.BuildNumber)" | grep -o '[0-9]\+$') + echo "Extracted Run Number: $runnumber" + + # If extraction fails, set a default + if [ -z "$runnumber" ]; then + echo "Extraction failed, using default value" + runnumber=$(date +"%S%N" | cut -c1-3) + echo "Generated fallback run number: $runnumber" + fi + + # Set the variable for later steps + echo "##vso[task.setvariable variable=RUNNUMBER]$runnumber" + echo "##vso[task.setvariable variable=RUNNUMBER;isOutput=true]$runnumber" + displayName: 'Get truncated run number' + name: getrunnumber + + - bash: | + echo "Building docker images" + # Format the date to be compatible with Docker tags + formatted_date=$(date +"%Y%m%d%H%M%S") + docker buildx build \ + --platform linux/amd64 \ + --push \ + -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ + -t "$(REGISTRY)/$(IMAGE_NAME):$formatted_date.$RUNNUMBER" \ + "$(Build.SourcesDirectory)" + displayName: 'Build and push docker images' + + \ No newline at end of file From 6a7c26a3a2d44f025db1b376d05182b1d276797c Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:04:03 +0300 Subject: [PATCH 14/24] Remove dependence on previous stages --- .azure-pipelines/ci-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index de022fdd354..ab27a7e78f7 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -164,7 +164,7 @@ extends: publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' - stage: PushDockerImageToRegistry - condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) + condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) displayName: 'Push docker image' jobs: - job: PushDockerImage @@ -240,4 +240,3 @@ extends: "$(Build.SourcesDirectory)" displayName: 'Build and push docker images' - \ No newline at end of file From 9000ed18d2e764abfc7c43b7d066cc0b7d61097d Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:08:35 +0300 Subject: [PATCH 15/24] Add dependsOn array --- .azure-pipelines/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index ab27a7e78f7..0591225c3ca 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -165,6 +165,7 @@ extends: - stage: PushDockerImageToRegistry condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) + dependsOn: [] displayName: 'Push docker image' jobs: - job: PushDockerImage From 994a0d4f4fe1d345e120229fa04718ac175bca51 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:14:36 +0300 Subject: [PATCH 16/24] Adjust docker build condition --- .azure-pipelines/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 0591225c3ca..881a4d5f417 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -164,7 +164,7 @@ extends: publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' - stage: PushDockerImageToRegistry - condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) + condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH']))) dependsOn: [] displayName: 'Push docker image' jobs: From 42f1f32a14c431147d9bf97475892293fc3f451b Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:28:44 +0300 Subject: [PATCH 17/24] Adjust condition --- .azure-pipelines/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 881a4d5f417..7b1a164806b 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -164,7 +164,7 @@ extends: publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' - stage: PushDockerImageToRegistry - condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH']))) + condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) dependsOn: [] displayName: 'Push docker image' jobs: From b68cb64b7d0e59d15b536271bff02d9b301ed46f Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:32:16 +0300 Subject: [PATCH 18/24] Adjust condition --- .azure-pipelines/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 7b1a164806b..0591225c3ca 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -164,7 +164,7 @@ extends: publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection' - stage: PushDockerImageToRegistry - condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) + condition: and(or(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), not(contains(variables['Build.SourceBranch'], '-preview'))) dependsOn: [] displayName: 'Push docker image' jobs: From ae8c87a4fd1453a60a5c725a578d7104e1352f1d Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:34:53 +0300 Subject: [PATCH 19/24] Run for this pipeline --- .azure-pipelines/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 0591225c3ca..9a4fd1b3c71 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -36,6 +36,7 @@ trigger: include: - main - dev + - task/migrate-acr-push-pipeline tags: include: - v* From c4c490231f5edded0534a3e2d11d9a02ba1ad388 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:41:45 +0300 Subject: [PATCH 20/24] Fix pool --- .azure-pipelines/ci-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 9a4fd1b3c71..7b5608848fb 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -172,7 +172,9 @@ extends: - job: PushDockerImage displayName: 'Push docker image' pool: - vmImage: 'ubuntu-latest' + name: Azure-Pipelines-1ESPT-ExDShared + image: ubuntu-latest + os: linux steps: - checkout: self From 1df489c2154985d54af36e5c3f20d0f2ef723b9b Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 15:58:04 +0300 Subject: [PATCH 21/24] Remove buildx inspection to reduce pulls --- .azure-pipelines/ci-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 7b5608848fb..fea1003d0b5 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -203,10 +203,6 @@ extends: - script: | docker buildx create --use --name mybuilder displayName: 'Set up Docker BuildX' - - - script: | - docker buildx inspect --bootstrap - displayName: 'Ensure BuildX is working' - powershell: | $version = $Env:BUILD_SOURCEBRANCH.replace("refs/tags/", "") From 60235e757ab9c9a854abac37293a2dfa3c165194 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Tue, 4 Mar 2025 16:12:05 +0300 Subject: [PATCH 22/24] Trigger for main --- .azure-pipelines/acr-push.yml | 35 ----------------------------------- .azure-pipelines/ci-build.yml | 2 +- 2 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 .azure-pipelines/acr-push.yml diff --git a/.azure-pipelines/acr-push.yml b/.azure-pipelines/acr-push.yml deleted file mode 100644 index 5ca954c8c75..00000000000 --- a/.azure-pipelines/acr-push.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) - -trigger: - branches: - include: - - dev - -pr: none - -variables: - buildConfiguration: 'Release' - buildPlatform: 'Any CPU' - -resources: - repositories: - - repository: 1ESPipelineTemplates - type: git - name: 1ESPipelineTemplates/1ESPipelineTemplates - ref: refs/tags/release - -extends: - template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates - parameters: - pool: - name: Azure-Pipelines-1ESPT-ExDShared - vmImage: windows-latest - stages: - - stage: Build - jobs: - - job: build - steps: - - task: UseDotNet@2 - displayName: 'Use .NET 8' - inputs: - version: 8.x \ No newline at end of file diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index fea1003d0b5..794b23873e9 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -27,7 +27,7 @@ variables: BuildAgent: ${{ parameters.BuildAgent }} GitUserEmail: "GraphTooling@service.microsoft.com" GitUserName: "Microsoft Graph DevX Tooling" - REGISTRY: 'msgraphpperegistry.azurecr.io' + REGISTRY: 'msgraphprodregistry.azurecr.io' IMAGE_NAME: 'public/microsoftgraph/powershell' PREVIEW_BRANCH: 'refs/heads/task/migrate-acr-push-pipeline' # Updated to target your branch From 5b49fbf4cc50cc0cd4cadc80313f2347cf3eccd1 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Sun, 16 Mar 2025 19:57:23 +0300 Subject: [PATCH 23/24] Push images to MAR --- .azure-pipelines/ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 794b23873e9..ab4b409d15b 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -187,7 +187,7 @@ extends: - task: AzureCLI@2 displayName: "Log in to Azure Container Registry" inputs: - azureSubscription: 'ACR Push Test' # service connection + azureSubscription: 'ACR Images Push Service Connection' # service connection scriptType: 'bash' scriptLocation: 'inlineScript' 'inlineScript': | From 3fa185a79d357a290d87db55bfb292e2e9fa1c28 Mon Sep 17 00:00:00 2001 From: "Evans Aboge (from Dev Box)" Date: Sun, 16 Mar 2025 20:21:30 +0300 Subject: [PATCH 24/24] Only trigger for main and tags --- .azure-pipelines/ci-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index ab4b409d15b..e8545e45bca 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -29,14 +29,13 @@ variables: GitUserName: "Microsoft Graph DevX Tooling" REGISTRY: 'msgraphprodregistry.azurecr.io' IMAGE_NAME: 'public/microsoftgraph/powershell' - PREVIEW_BRANCH: 'refs/heads/task/migrate-acr-push-pipeline' # Updated to target your branch + PREVIEW_BRANCH: 'refs/heads/main' # Updated to target your branch trigger: branches: include: - main - dev - - task/migrate-acr-push-pipeline tags: include: - v*