Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect failure notification in vcpkg publishing #3838

Merged
merged 29 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3fa5606
Set up for testing of template pipeline
danieljurek Jul 12, 2022
1c008cf
Override branches, set up for template GA release
danieljurek Jul 12, 2022
3d3a6ee
More TODOs to prevent merging an unintended change
danieljurek Jul 12, 2022
d674489
More removal of TestPipeline
danieljurek Jul 12, 2022
6b7d216
Increment template version number
danieljurek Jul 13, 2022
882876a
Use script to set package version
danieljurek Jul 13, 2022
be3bcb9
Check out the correct branch
danieljurek Jul 14, 2022
b5e7dfb
branch parameter in the command
danieljurek Jul 14, 2022
f5cd1b1
Use $(PublishToVcpkg) to determine if we should check for changes
danieljurek Jul 14, 2022
62a24cf
dictionary syntax
danieljurek Jul 14, 2022
76c5a9f
Set GA package version to validate GA publish scenario
danieljurek Jul 18, 2022
3a74a31
Update changelog
danieljurek Jul 18, 2022
243f42a
create-pull-request.yml optionally pushes changes
danieljurek Jul 18, 2022
c5b3adc
Output GH PR URI
danieljurek Jul 18, 2022
be3f7a1
Macro syntax with a variable set earlier
danieljurek Jul 18, 2022
d4b5b56
Move up to 1.2.0-beta.2
danieljurek Jul 18, 2022
8e64e85
beta.1
danieljurek Jul 18, 2022
79d7e30
Revert changelog
danieljurek Jul 18, 2022
0864477
Revert testing-related changes
danieljurek Jul 18, 2022
566ce40
Revert vcpkg-clone.yml
danieljurek Jul 18, 2022
5004211
Revert eng/common changes, ensure global $(HasChanges) is set properly
danieljurek Jul 20, 2022
ce5bc5c
Changes to enable testing
danieljurek Jul 20, 2022
7dc258d
1.1.0-beta.1
danieljurek Jul 20, 2022
285f290
vcpkg clone should clone at configured branch
danieljurek Jul 20, 2022
ec7725d
Clone "main" branch of vcpkg betas
danieljurek Jul 20, 2022
dae9eca
Undo test-specific changes
danieljurek Jul 20, 2022
1d98689
More PR cleanup
danieljurek Jul 20, 2022
6d30f34
PR cleanup
danieljurek Jul 20, 2022
540d806
displayName
danieljurek Jul 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion eng/common/pipelines/templates/steps/git-push-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,22 @@ steps:
echo "##vso[task.setvariable variable=HasChanges]$false"
echo "No changes so skipping code push"
}

# Conditions determined that SkipCheckingForChanges is 'false', set this
# as a variable which can be passed into the "Push Changes" step
echo "##vso[task.setvariable variable=SkipCheckingForChanges]false"
displayName: Check for changes
condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false))
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- pwsh: |
danieljurek marked this conversation as resolved.
Show resolved Hide resolved
# Checking for changes was skipped, set a variable which can be passed into
# the "Push Changes" step
Write-Host "##vso[task.setvariable variable=SkipCheckingForChanges]true"
condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, true))
displayName: Set SkipCheckingForChanges to true

- pwsh: |
# Remove the repo owner from the front of the repo name if it exists there
$repoName = "${{ parameters.TargetRepoName }}" -replace "^${{ parameters.TargetRepoOwner }}/", ""
Expand All @@ -39,6 +50,7 @@ steps:
condition: succeeded()
workingDirectory: ${{ parameters.WorkingDirectory }}

# $(SkipCheckingForChanges) is set in an earlier step
- task: PowerShell@2
displayName: Push changes
condition: and(succeeded(), eq(variables['HasChanges'], 'true'))
Expand All @@ -51,4 +63,4 @@ steps:
-CommitMsg "${{ parameters.CommitMsg }}"
-GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.BaseRepoOwner }}/$(RepoNameWithoutOwner).git"
-PushArgs "${{ parameters.PushArgs }}"
-SkipCommit $${{ parameters.SkipCheckingForChanges }}
-SkipCommit $$(SkipCheckingForChanges)
13 changes: 9 additions & 4 deletions eng/pipelines/templates/stages/archetype-cpp-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ stages:
- pwsh: |
$branchName = "azure-sdk-for-cpp-${{ artifact.Name }}-$(Build.BuildId)"
if ('$(VcpkgForkBranchName)') {
Write-Host "Using queue time branch name"
Write-Host "Using queue time branch name"
$branchName = '$(VcpkgForkBranchName)'
}
Write-Host "##vso[task.setvariable variable=PrBranchName]$branchName"
Expand Down Expand Up @@ -177,21 +177,26 @@ stages:
parameters:
WorkingDirectory: $(Pipeline.Workspace)/vcpkg

# SkipCheckingForChanges is true to skip the commit step
# (which is already done by Update-VcpkgPort.ps1)
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml
parameters:
PushWorkingDirectoryChanges: false
RepoOwner: $(VcpkgPrRepoOwner)
RepoName: $(VcpkgPrRepoName)
WorkingDirectory: $(Pipeline.Workspace)/vcpkg
PrBranchName: $(PrBranchName)
PRTitle: $(PrTitle)
PRBody: Update vcpkg ports for Azure SDK release. This release may contain multiple ports.
SkipCheckingForChanges: true
BaseBranchName: $(DefaultBranch)
OpenAsDraft: ${{ parameters.TestPipeline }}
PRLabels: "auto-merge"
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'
# If PublishToVcpkg is true, this template blindly attempts to create a PR. In that case
# changes must already be checked into the branch for this template to succeed.
# If PublishToVcpkg is false, the non-skipped checking for changes will result in no attempt
# to open a PR because there will be no detected changes.
# Use dictionary syntax because the template inserts the literal string into a `condition:`
# element.
SkipCheckingForChanges: variables['PublishToVcpkg']
danieljurek marked this conversation as resolved.
Show resolved Hide resolved

- pwsh: |
$codeOwnersToNotify = $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 `
Expand Down