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

Use fork repo for daily updates in Java #25677

Merged
merged 14 commits into from
Dec 2, 2021
17 changes: 14 additions & 3 deletions eng/pipelines/docindex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
vmImage: ubuntu-20.04
variables:
DocRepoLocation: $(Pipeline.Workspace)/docs
DailyDocsRepoLocation: $(Pipeline.Workspace)/dailyDocsFork
DocRepoOwner: Azure
DocRepoName: azure-docs-sdk-java
steps:
Expand Down Expand Up @@ -49,13 +50,23 @@ jobs:
- template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml
parameters:
DailyBranchVariableName: DailyDocsBranchName
# Sync docs fork repo onboarding files/folders
weshaggard marked this conversation as resolved.
Show resolved Hide resolved
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
sima-zhu marked this conversation as resolved.
Show resolved Hide resolved
parameters:
SkipDefaultCheckout: true
Paths:
- package.json
- metadata/
Repositories:
- Name: "azure-sdk/$(DocRepoName)"
WorkingDirectory: $(DailyDocsRepoLocation)
- pwsh: |
$ErrorActionPreference = "Continue"
git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null
$LASTEXITCODE = 0 # This ignores any error from git checkout
git status
displayName: Checkout daily branch if it exists
workingDirectory: $(DocRepoLocation)
workingDirectory: $(DailyDocsRepoLocation)

# Docs daily updates is supposed to download packages from public feed repository, so we have to specify additional repositories in a POM or the profile.
# Here is maven documentation: https://maven.apache.org/guides/mini/guide-multiple-repositories.html
Expand All @@ -76,7 +87,7 @@ jobs:
inputs:
pwsh: true
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
arguments: -DocRepoLocation $(DocRepoLocation)
arguments: -DocRepoLocation "$(DailyDocsRepoLocation)"
displayName: Update Docs Onboarding for Daily branch
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
parameters:
Expand All @@ -85,7 +96,7 @@ jobs:
CommitMsg: "Update targeting packages based on release metadata. (Daily docs)"
TargetRepoName: $(DocRepoName)
TargetRepoOwner: $(DocRepoOwner)
WorkingDirectory: $(DocRepoLocation)
WorkingDirectory: $(DailyDocsRepoLocation)
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts

- task: PowerShell@2
Expand Down
7 changes: 2 additions & 5 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ parameters:
- name: ArtifactName
type: string
default: 'not-specified'
- name: TargetDocRepoOwner
type: string
default: ''
- name: TargetDocRepoName
type: string
default: ''
Expand Down Expand Up @@ -223,7 +220,7 @@ stages:
PackageInfoLocations:
- $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json
WorkingDirectory: $(System.DefaultWorkingDirectory)
TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
TargetDocRepoOwner: 'Azure'
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
Language: 'java'
SparseCheckoutPaths:
Expand Down Expand Up @@ -388,7 +385,7 @@ stages:
- ${{if ne(artifact.skipPublishDocMs, 'true')}}:
- $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json
WorkingDirectory: $(System.DefaultWorkingDirectory)
TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
TargetDocRepoOwner: "azure-sdk"
sima-zhu marked this conversation as resolved.
Show resolved Hide resolved
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
Language: 'java'
DailyDocsBuild: true
Expand Down
4 changes: 0 additions & 4 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: TargetDocRepoOwner
type: string
default: Azure
- name: TargetDocRepoName
type: string
default: azure-docs-sdk-java
Expand Down Expand Up @@ -96,6 +93,5 @@ stages:
${{ if eq(parameters.ServiceDirectory, 'template') }}:
TestPipeline: true
ArtifactName: packages
TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }}
TargetDocRepoName: ${{ parameters.TargetDocRepoName }}

4 changes: 0 additions & 4 deletions eng/pipelines/templates/stages/cosmos-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ parameters:
- name: SDKType
type: string
default: not-specified
- name: TargetDocRepoOwner
type: string
default: Azure
- name: TargetDocRepoName
type: string
default: azure-docs-sdk-java
Expand Down Expand Up @@ -127,5 +124,4 @@ stages:
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ArtifactName: packages
TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
TargetDocRepoName: ${{parameters.TargetDocRepoName}}