From d63b6a7793bffb3ec38ef299dda5479ea2cda106 Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Fri, 21 Jul 2023 14:01:03 +0200 Subject: [PATCH] [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 --- .github/workflows/ubuntu-win-generation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu-win-generation.yml b/.github/workflows/ubuntu-win-generation.yml index 0a464e3b..33d9ab5c 100644 --- a/.github/workflows/ubuntu-win-generation.yml +++ b/.github/workflows/ubuntu-win-generation.yml @@ -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 }} `