Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools repository for Tools P…
Browse files Browse the repository at this point in the history
…R 1477
  • Loading branch information
sima-zhu authored and azure-sdk committed Mar 18, 2021
1 parent 0486526 commit c8ed829
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 6 additions & 7 deletions eng/common/pipelines/templates/steps/docs-metadata-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ steps:
displayName: Enable Long Paths if Necessary

- pwsh: |
git clone https://$(azuresdk-github-pat)@github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo
git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo
try {
Push-Location ${{ parameters.WorkingDirectory }}/repo
$setDefaultBranch = (git remote show origin | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1'
Write-Host "Setting DefaultBranch=$setDefaultBranch"
echo "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch"
Write-Host "git checkout ${{ parameters.SourceBranchName }}"
git checkout ${{ parameters.SourceBranchName }}
} finally {
Expand All @@ -46,10 +49,6 @@ steps:
displayName: Clone Documentation Repository
ignoreLASTEXITCODE: false

- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
parameters:
WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo

- task: PowerShell@2
displayName: 'Apply Documentation Updates From Artifact'
inputs:
Expand Down
4 changes: 4 additions & 0 deletions eng/common/scripts/git-branch-push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,9 @@ do
if ($LASTEXITCODE -ne 0 -or $tryNumber -ge $numberOfRetries)
{
Write-Error "Unable to push commit after $($tryNumber) retries LASTEXITCODE=$($LASTEXITCODE), see command output above."
if (0 -eq $LASTEXITCODE)
{
exit 1
}
exit $LASTEXITCODE
}

0 comments on commit c8ed829

Please sign in to comment.