Skip to content

Commit d63b6a7

Browse files
[ubuntu, windows] cast "run_id" to 32 bit unsigned to match BuildId (#7950)
* [ubuntu, windows] cast "run_id" to 32 bit unsigned to match BuildId restriction ./images.CI/linux-and-win/create-release.ps1 ` -BuildId 5621210575 ` -Organization *** ` -DefinitionId *** ` -Project *** ` -ImageName ubuntu2204 ` -AccessToken *** shell: /usr/bin/pwsh -command ". '{0}'" env: CHECKOUT_TYPE: pull_request TemplatePath: /home/vsts/Agents/image-generation/_work/runner-images/runner-images/images/linux/ubuntu2204.pkr.hcl TemplateDirectoryPath: /home/vsts/Agents/image-generation/_work/runner-images/runner-images/images/linux ImageType: ubuntu2204 create-release.ps1: /home/vsts/Agents/image-generation/_work/_temp/ee00e9c3-e508-4c8d-b369-ffe3e2afcbc9.ps1:3 Line | 3 | -BuildId 5621210575 ` | ~~~~~~~~~~ | Cannot process argument transformation on parameter 'BuildId'. Cannot | convert value "5621210575" to type "System.UInt32". Error: "Value was | either too large or too small for a UInt32." * cast another occurence to UInt32 MaxValue
1 parent e486e6c commit d63b6a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ubuntu-win-generation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
-ClientId ${{ secrets.CLIENT_ID }} `
8787
-ClientSecret ${{ secrets.CLIENT_SECRET }} `
8888
-Location ${{ secrets.AZURE_LOCATION }} `
89-
-ResourcesNamePrefix ${{ github.run_id }} `
89+
-ResourcesNamePrefix ${{ github.run_id }} % [System.UInt32]::MaxValue `
9090
-ResourceGroup ${{ secrets.AZURE_RESOURCE_GROUP }} `
9191
-StorageAccount ${{ secrets.AZURE_STORAGE_ACCOUNT }} `
9292
-SubscriptionId ${{ secrets.AZURE_SUBSCRIPTION }} `
@@ -113,7 +113,7 @@ jobs:
113113
- name: Create release for VM deployment
114114
run: |
115115
./images.CI/linux-and-win/create-release.ps1 `
116-
-BuildId ${{ github.run_id }} `
116+
-BuildId ${{ github.run_id }} % [System.UInt32]::MaxValue `
117117
-Organization ${{ secrets.RELEASE_TARGET_ORGANIZATION }} `
118118
-DefinitionId ${{ secrets.RELEASE_TARGET_DEFINITION_ID }} `
119119
-Project ${{ secrets.RELEASE_TARGET_PROJECT }} `

0 commit comments

Comments
 (0)