Skip to content

The prepare-pipeline script should setup the vcpkg queue time variables for new package pipelines that get created #4860

Open
@ahsonkhan

Description

@ahsonkhan

One issue we hit when releasing a package for the first time using the created pipeline, such as the EventHubs package, is that the two required queue time variables don't exist:

  • VcpkgForkBranchName
  • VcpkgPRTitle

Without these defined, the last publish to vcpkg step fails when triggering the release. Note these variables don't require to have a value set to them, just that they exist in the pipeline definition.

See
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2988130&view=logs&j=89ce207c-d97b-5c1d-20a4-270af1e71c5e&t=2d515f10-b48d-5a92-77dd-16c373a6ba1f

2023-08-09T00:31:14.5434633Z ##[section]Starting: Push changes
2023-08-09T00:31:14.5519729Z ==============================================================================
2023-08-09T00:31:14.5520185Z Task         : PowerShell
2023-08-09T00:31:14.5520422Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-08-09T00:31:14.5520681Z Version      : 2.220.0
2023-08-09T00:31:14.5520895Z Author       : Microsoft Corporation
2023-08-09T00:31:14.5521108Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-08-09T00:31:14.5521359Z ==============================================================================
2023-08-09T00:31:15.3800311Z Generating script.
2023-08-09T00:31:15.3842080Z Formatted command: . 'D:\a\_work\1\s\eng\common\scripts\git-branch-push.ps1' -PRBranchName "$(VcpkgForkBranchName)" -CommitMsg "not-specified" -GitUrl "https://***@github.com/azure-sdk/vcpkg.git" -PushArgs "" -SkipCommit $true
2023-08-09T00:31:15.4143524Z ========================== Starting Command Output ===========================
2023-08-09T00:31:15.4315395Z ##[command]"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_work\_temp\d4265d54-6cdc-4764-b5a9-27618572fedf.ps1'"
2023-08-09T00:31:17.6926081Z VcpkgForkBranchName : �[31;1mThe term 'VcpkgForkBranchName' is not recognized as a name of a cmdlet, function, script file, or executable program.
2023-08-09T00:31:17.6927287Z Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
2023-08-09T00:31:17.6928248Z At D:\a\_work\_temp\d4265d54-6cdc-4764-b5a9-27618572fedf.ps1:4 char:76
2023-08-09T00:31:17.6929655Z + … pts\git-branch-push.ps1' -PRBranchName "$(VcpkgForkBranchName)" -Comm …
2023-08-09T00:31:17.6930518Z +                                             ~~~~~~~~~~~~~~~~~~~
2023-08-09T00:31:17.6931166Z + CategoryInfo          : ObjectNotFound: (VcpkgForkBranchName:String) [], ParentContainsErrorRecordException
2023-08-09T00:31:17.6931791Z + FullyQualifiedErrorId : CommandNotFoundException�[0m
2023-08-09T00:31:17.8773857Z ##[error]PowerShell exited with code '1'.
2023-08-09T00:31:17.9050015Z ##[section]Finishing: Push changes

From @danieljurek:

we should either be creating those variables in the prepare-pipelines script or (more likely) handling the scenario where those variables don't exist in the pipeline definition so this kind of error doesn't happen again

Metadata

Metadata

Assignees

No one assigned

    Labels

    Central-EngSysThis issue is owned by the Engineering System team.

    Type

    No type

    Projects

    Status

    🤔 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions