[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
This commit is contained in:
ilia-shipitsin
2023-07-21 14:01:03 +02:00
committed by GitHub
parent e486e6c0c7
commit d63b6a7793

View File

@@ -86,7 +86,7 @@ jobs:
-ClientId ${{ secrets.CLIENT_ID }} `
-ClientSecret ${{ secrets.CLIENT_SECRET }} `
-Location ${{ secrets.AZURE_LOCATION }} `
-ResourcesNamePrefix ${{ github.run_id }} `
-ResourcesNamePrefix ${{ github.run_id }} % [System.UInt32]::MaxValue `
-ResourceGroup ${{ secrets.AZURE_RESOURCE_GROUP }} `
-StorageAccount ${{ secrets.AZURE_STORAGE_ACCOUNT }} `
-SubscriptionId ${{ secrets.AZURE_SUBSCRIPTION }} `
@@ -113,7 +113,7 @@ jobs:
- name: Create release for VM deployment
run: |
./images.CI/linux-and-win/create-release.ps1 `
-BuildId ${{ github.run_id }} `
-BuildId ${{ github.run_id }} % [System.UInt32]::MaxValue `
-Organization ${{ secrets.RELEASE_TARGET_ORGANIZATION }} `
-DefinitionId ${{ secrets.RELEASE_TARGET_DEFINITION_ID }} `
-Project ${{ secrets.RELEASE_TARGET_PROJECT }} `