-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nightly vcpkg publishing (#2025)
* Tool changes to support nightly test package release * Initial wiring up and refactor vcpkg-publish.yml * Use vcpkg-clone.yml * Disable publishing for verification of nightly builds * Complete the comment * Dependency is enforced at the stage level, not the deployment/job level * Remove environment, no approval needed * Add ability to enable test release parameters * deploy -> job * deployment -> job * Remove strategy * Download pipeline artifacts * task -> download * Set appropriate working directory * git status * Set working directory * Add pipeline for nightly vcpkg PR update * Correct vcpkg-clone.yml path * Add identity parameters to git merge commands * Remove GitIdentityParameters, the merge command does not suppor tthem. Add instead in the pipeline * Split lines * Write-Host * Template for nightly branch name, update comments, Check for scheduling or "PublishNightlyVcpkg" * include archetype-cpp-release.yml changes * Re-enable publishing stage * Close the and * Runtime condition for integration stage * Move integration below package publishing stages * try -- to disambiguate * ^ -> ~ * Remove -- * Documentation and variable naming * Move documentation comment * Update eng/pipelines/templates/steps/generate-nightly-branch-name.yml Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * Review feedback * Add ability to skip all release steps * Equal sign * The right number of dashes * Checkout before merge * Checkout the default branch * --no-ff * git reset * Skip publishing for artifacts which are not publishign to vcpkg * Add git config --unset * Apply suggestions from code review Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * Review feedback * Review feedback * Remove extra reset * TestRelease -> DailyRelease Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
- Loading branch information
1 parent
38d3535
commit 5a99f38
Showing
7 changed files
with
248 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
jobs: | ||
- job: | ||
displayName: Daily vcpkg PR | ||
pool: | ||
name: azsdk-pool-mms-win-2019-general | ||
vmImage: MMS2019 | ||
|
||
variables: | ||
# The branch in the azure-sdk/vcpkg repo that is updated daily with the | ||
# latest set of ports | ||
TargetPrBranch: release/azure-sdk-for-cpp-daily-verification | ||
|
||
steps: | ||
- checkout: self | ||
|
||
- template: /eng/pipelines/templates/steps/generate-daily-branch-name.yml | ||
|
||
- template: /eng/pipelines/templates/steps/vcpkg-clone.yml | ||
parameters: | ||
Workspace: $(Pipeline.Workspace) | ||
RepoOwner: azure-sdk | ||
|
||
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml | ||
parameters: | ||
WorkingDirectory: $(Pipeline.Workspace)/vcpkg | ||
|
||
- pwsh: | | ||
Write-Host "git checkout $(DailyBranchName)" | ||
git checkout $(DailyBranchName) | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Error "Cannot check out $(DailyBranchName) LASTEXITCODE=$LASTEXITCODE" | ||
} | ||
Write-Host "##vso[task.setvariable variable=HasChanges]$true" | ||
workingDirectory: $(Pipeline.Workspace)/vcpkg | ||
displayName: Update vcpkg Daily Branch | ||
# This step will skip creating the PR if the PR already exists | ||
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml | ||
parameters: | ||
# Force push so this recreates the $(TargetPrBranch) | ||
PushArgs: --force | ||
BaseBranchName: $(DefaultBranch) | ||
PRBranchName: $(TargetPrBranch) | ||
RepoOwner: Microsoft | ||
RepoName: vcpkg | ||
WorkingDirectory: $(Pipeline.Workspace)/vcpkg | ||
CommitMsg: Update with changes from $(DailyBranchName) | ||
PRTitle: "[DO NOT MERGE] Daily Azure SDK for C++ CI validation" | ||
PRBody: This is a long-lived draft PR should not be merged. Its branch is be updated periodically to validate the Azure SDK for C++ against the vcpkg CI. | ||
ScriptDirectory: $(System.DefaultWorkingDirectory)/eng/common/scripts | ||
OpenAsDraft: true | ||
SkipCheckingForChanges: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
steps: | ||
- pwsh: | | ||
$branchName = $env:DAILYBRANCHOVERRIDE | ||
if (!$branchName) { | ||
$formattedDate = Get-Date -Format 'yyyy-MM-dd' | ||
$branchName = "release/daily-$formattedDate" | ||
} | ||
Write-Host "##vso[task.setvariable variable=DailyBranchName]$branchName" | ||
displayName: Set branch name in fork repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
parameters: | ||
Workspace: $(Pipeline.Workspace) | ||
RepoOwner: not-set | ||
RepoName: vcpkg | ||
PRBranchName: not-set | ||
|
||
steps: | ||
- pwsh: | | ||
Write-Host "git clone https://github.com/${{ parameters.RepoOwner }}/${{ parameters.RepoName }} ${{ parameters.Workspace }}/vcpkg" | ||
git clone https://github.com/${{ parameters.RepoOwner }}/${{ parameters.RepoName }} ${{ parameters.Workspace }}/vcpkg | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Error "Unable to check out vcpkg fork repo" | ||
exit $LASTEXITCODE | ||
} | ||
displayName: Clone vcpkg from upstream | ||
# Check out the PR branch if it's already in remote. Ignore failures. | ||
- pwsh: | | ||
$ErrorActionPreference = "Continue" | ||
git checkout "origin/${{ parameters.PRBranchName }}" 2>&1 | Out-Null | ||
$LASTEXITCODE = 0 # This ignores any error from git checkout | ||
git status | ||
displayName: Checkout Previous PRBranch if it exists | ||
workingDirectory: ${{ parameters.Workspace }}/vcpkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
parameters: | ||
GitHubRepo: $(Build.Repository.Name) | ||
Workspace: $(Pipeline.Workspace) | ||
ArtifactName: not-set | ||
VcpkgPortName: not-set | ||
DisplayNameExtension: | ||
DailyReleaseRef: | ||
DailyRelease: false | ||
|
||
steps: | ||
- task: Powershell@2 | ||
inputs: | ||
filePath: eng/scripts/Initialize-VcpkgRelease.ps1 | ||
arguments: >- | ||
-GitHubRepo "${{ parameters.GitHubRepo }}" | ||
-PackageSpecPath ${{ parameters.Workspace }}/packages/${{ parameters.ArtifactName }}/package-info.json | ||
-SourceDirectory ${{ parameters.Workspace }}/packages/${{ parameters.ArtifactName }}/vcpkg | ||
-DailyReleaseRef '${{ parameters.DailyReleaseRef }}' | ||
-Verbose | ||
pwsh: true | ||
displayName: Initialize vcpkg release ${{ parameters.DisplayNameExtension }} | ||
|
||
- task: Powershell@2 | ||
inputs: | ||
pwsh: true | ||
targetType: filePath | ||
filePath: eng/scripts/Update-VcpkgPort.ps1 | ||
arguments: >- | ||
-ReleaseArtifactSourceDirectory "${{ parameters.Workspace }}/packages/${{ parameters.ArtifactName }}" | ||
-PortDestinationDirectory 'ports/${{ parameters.VcpkgPortName }}' | ||
-VcpkgPortName '${{ parameters.VcpkgPortName }}' | ||
-GitCommitParameters '-c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com"' | ||
-DailyRelease:$${{ parameters.DailyRelease }} | ||
workingDirectory: ${{ parameters.Workspace }}/vcpkg | ||
displayName: Update vcpkg port ${{ parameters.DisplayNameExtension }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.