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

Put the namespaces(packages) into the json files #39593

Merged
merged 7 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 0 additions & 22 deletions eng/pipelines/templates/stages/archetype-java-release-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,6 @@ stages:
- metadata/
DocValidationImageId: "$(DocValidationImageId)"

- ${{ each artifact in parameters.Artifacts }}:
- ${{if ne(artifact.skipPublishDocMs, 'true')}}:
- template: /eng/pipelines/templates/steps/fetch-package-list.yml
parameters:
JavaDocJarLocation: "$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.groupId}}/${{artifact.name}}"
ArtifactName: ${{artifact.name}}
TargetBranch: $(TargetBranchName)
DocRepoLocation: $(DocRepoLocation)
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
TargetDocRepoOwner: "Azure"

- deployment: PublishDocs
displayName: Publish Docs to GitHubIO Blob Storage
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
Expand Down Expand Up @@ -518,15 +507,4 @@ stages:
- metadata/
DocValidationImageId: "$(DocValidationImageId)"

- ${{ each artifact in parameters.Artifacts }}:
- ${{if ne(artifact.skipPublishDocMs, 'true')}}:
- template: /eng/pipelines/templates/steps/fetch-package-list.yml
parameters:
JavaDocJarLocation: "$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.groupId}}/${{artifact.name}}"
ArtifactName: ${{artifact.name}}
TargetBranch: $(TargetBranchName)
DocRepoLocation: $(DocRepoLocation)
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
TargetDocRepoOwner: "azure-sdk"

- template: /eng/common/pipelines/templates/steps/docsms-ensure-validation.yml
11 changes: 0 additions & 11 deletions eng/pipelines/templates/stages/archetype-java-release-patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,6 @@ stages:
- metadata/
DocValidationImageId: "$(DocValidationImageId)"

- ${{ each artifact in parameters.Artifacts }}:
- ${{if ne(artifact.skipPublishDocMs, 'true')}}:
- template: /eng/pipelines/templates/steps/fetch-package-list.yml
parameters:
JavaDocJarLocation: "$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.groupId}}/${{artifact.name}}"
ArtifactName: ${{artifact.name}}
TargetBranch: $(TargetBranchName)
DocRepoLocation: $(DocRepoLocation)
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
TargetDocRepoOwner: "Azure"

- deployment: PublishDocs
displayName: Publish Docs to GitHubIO Blob Storage
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
Expand Down
19 changes: 0 additions & 19 deletions eng/pipelines/templates/stages/archetype-java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,6 @@ stages:
- docs-ref-services/
- metadata/
DocValidationImageId: "$(DocValidationImageId)"
- template: /eng/pipelines/templates/steps/fetch-package-list.yml
parameters:
JavaDocJarLocation: "$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.groupId}}/${{artifact.name}}"
ArtifactName: ${{artifact.name}}
TargetBranch: $(TargetBranchName)
DocRepoLocation: $(DocRepoLocation)
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
TargetDocRepoOwner: "Azure"

- ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}:
- deployment: PublishDocs
Expand Down Expand Up @@ -495,15 +487,4 @@ stages:
- metadata/
DocValidationImageId: "$(DocValidationImageId)"

- ${{ each artifact in parameters.Artifacts }}:
- ${{if ne(artifact.skipPublishDocMs, 'true')}}:
- template: /eng/pipelines/templates/steps/fetch-package-list.yml
parameters:
JavaDocJarLocation: "$(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.groupId}}/${{artifact.name}}"
ArtifactName: ${{artifact.name}}
TargetBranch: $(TargetBranchName)
DocRepoLocation: $(DocRepoLocation)
TargetDocRepoName: ${{parameters.TargetDocRepoName}}
TargetDocRepoOwner: "azure-sdk"

- template: /eng/common/pipelines/templates/steps/docsms-ensure-validation.yml
29 changes: 0 additions & 29 deletions eng/pipelines/templates/steps/fetch-package-list.yml

This file was deleted.

49 changes: 0 additions & 49 deletions eng/scripts/Fetch-PackageList-Javadoc.ps1

This file was deleted.

29 changes: 28 additions & 1 deletion eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function Get-java-PackageInfoFromPackageFile ($pkg, $workingDirectory)
$pkgId = $contentXML.project.artifactId
$docsReadMeName = $pkgId -replace "^azure-" , ""
$pkgVersion = $contentXML.project.version
$groupId = if ($contentXML.project.groupId -eq $null) { $contentXML.project.parent.groupId } else { $contentXML.project.groupId }
$groupId = if ($null -eq $contentXML.project.groupId) { $contentXML.project.parent.groupId } else { $contentXML.project.groupId }
$releaseNotes = ""
$readmeContent = ""

Expand Down Expand Up @@ -141,6 +141,33 @@ function Get-java-PackageInfoFromPackageFile ($pkg, $workingDirectory)
}
}

# Defined in common.ps1 as:
# $GetDocsMsDevLanguageSpecificPackageInfoFn = "Get-${Language}-DocsMsDevLanguageSpecificPackageInfo"
function Get-java-DocsMsDevLanguageSpecificPackageInfo($packageInfo, $packageSourceOverride) {
# If the default namespace isn't in the package info then it needs to be added
# Can't check if (!$packageInfo.Namespaces) in strict mode because Namespaces won't exist
# at all.
if (!($packageInfo | Get-Member Namespaces)) {
$version = $packageInfo.Version
# If the dev version is set, use that
if ($packageInfo.DevVersion) {
$version = $packageInfo.DevVersion
}
$namespaces = Fetch-Namespaces-From-Javadoc $packageInfo.Name $packageInfo.Group $version
if ($namespaces.Count -gt 0) {
$packageInfo | Add-Member -Type NoteProperty -Name "Namespaces" -Value $namespaces
} else {
# If nothing else, the package name will have "-" instead of "." which should make it evident
# that we couldn't find namespaces.
JimSuplizio marked this conversation as resolved.
Show resolved Hide resolved
LogWarning "Unable to find namespaces for $($packageInfo.Name):$version, using the package name."
$tempNamespaces = @()
$tempNamespaces += $packageInfo.Name
$packageInfo | Add-Member -Type NoteProperty -Name "Namespaces" -Value $tempNamespaces
}
}
return $packageInfo
}

# Stage and Upload Docs to blob Storage
function Publish-java-GithubIODocs ($DocLocation, $PublicArtifactLocation)
{
Expand Down
Loading
Loading