Skip to content

Commit 6f52476

Browse files
Microsoft Graph DevX ToolingMicrosoft Graph DevX Tooling
authored andcommitted
fix: define ACR variables at pipeline scope
Keep the publishing step template parameter-free while declaring registry and service connection variables in the Azure Pipelines that consume it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af247b04-ecf8-4873-a78c-33d6437bb0d0
1 parent b677309 commit 6f52476

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

.azure-pipelines/ci-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ variables:
2727
BuildAgent: ${{ parameters.BuildAgent }}
2828
GitUserEmail: "GraphTooling@service.microsoft.com"
2929
GitUserName: "Microsoft Graph DevX Tooling"
30+
ACR_SERVICE_CONNECTION: 'ACR Images Push Service Connection'
3031
REGISTRY: 'msgraphprodregistry.azurecr.io'
32+
REGISTRY_NAME: 'msgraphprodregistry'
3133
IMAGE_NAME: 'public/microsoftgraph/powershell'
3234

3335
trigger:

.azure-pipelines/common-templates/publish-psresources-acr.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
variables:
5-
ACR_SERVICE_CONNECTION: 'ACR Images Push Service Connection'
6-
REGISTRY: 'msgraphprodregistry.azurecr.io'
7-
REGISTRY_NAME: 'msgraphprodregistry'
8-
ARTIFACT_PATH: '$(System.DefaultWorkingDirectory)/drop'
9-
104
steps:
115
- task: AzurePowerShell@5
126
displayName: 'Publish PowerShell packages to ACR'
@@ -65,10 +59,11 @@ steps:
6559
}
6660
}
6761
68-
$packages = @(Get-ChildItem -Path '$(ARTIFACT_PATH)' -Recurse -File -Filter 'Microsoft.Graph*.nupkg' |
62+
$artifactPath = '$(System.DefaultWorkingDirectory)/drop'
63+
$packages = @(Get-ChildItem -Path $artifactPath -Recurse -File -Filter 'Microsoft.Graph*.nupkg' |
6964
ForEach-Object { Get-PackageMetadata -PackagePath $_.FullName })
7065
if ($packages.Count -eq 0) {
71-
throw "No Microsoft Graph PowerShell packages were found under '$(ARTIFACT_PATH)'."
66+
throw "No Microsoft Graph PowerShell packages were found under '$artifactPath'."
7267
}
7368
7469
$packages = $packages | Sort-Object @{

.azure-pipelines/sdk-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ variables:
2727
BuildAgent: ${{ parameters.BuildAgent }}
2828
GitUserEmail: "GraphTooling@service.microsoft.com"
2929
GitUserName: "Microsoft Graph DevX Tooling"
30+
ACR_SERVICE_CONNECTION: 'ACR Images Push Service Connection'
3031
REGISTRY: 'msgraphprodregistry.azurecr.io'
32+
REGISTRY_NAME: 'msgraphprodregistry'
3133
IMAGE_NAME: 'public/microsoftgraph/powershell'
3234
PREVIEW_BRANCH: 'refs/heads/main' # Updated to target your branch
3335

0 commit comments

Comments
 (0)