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

Move to eng/common docindex reference #17728

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 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
3 changes: 1 addition & 2 deletions eng/common/pipelines/templates/steps/docindex.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
jobs:
- job: CreateDocIndex
variables:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you plan to make this in the tools repo once you get this working here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this is a miss when I do testing. Since the docindex is not in master, I haven't done full testing on pipeline. Will test all repo and submit another change in tool repo.

- template: templates/variables/globals.yml
pool:
vmImage: windows-2019
steps:
Expand Down Expand Up @@ -49,6 +47,7 @@ jobs:
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site

- pwsh: |
git -c user.name=`"azure-sdk`" -c user.email=`"[email protected]`" commit -am "Save the language updates."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they have to be committed? Why not just revert them since you already made a copy of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can go with git reset --hard HEAD

git checkout -b gh-pages-local --track origin/gh-pages-root
workingDirectory: $(Build.SourcesDirectory)
displayName: Git pull GH pages branch
Expand Down
4 changes: 4 additions & 0 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ $PackageRepository = "Maven"
$packagePattern = "*.pom"
$MetadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/java-packages.csv"
$BlobStorageUrl = "https://azuresdkdocs.blob.core.windows.net/%24web?restype=container&comp=list&prefix=java%2F&delimiter=%2F"
$IndexHtmlLoc = "index.html"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any case where this isn't index.html, and if there is can we change it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally, .NET points to api/index.html.

https://azuresdkdocs.blob.core.windows.net/$web/dotnet/Azure.AI.TextAnalytics/1.0.0/api/index.html

I can do double check if it can be replaced by index.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have them all be index.hml if possible. This is one of those other inconsistencies that has bothered me and we have to workaround. See https://github.com/Azure/azure-sdk/blob/master/eng/scripts/Update-Release-Versions.ps1#L59 as an example were we had do workaround these being different.

$AppTitle = "Azure SDK for Java"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just default this to "Azure SDK for $lang"? If we do that and everything uses index.html by default then that will allow most languages to not have to pass any arguments to the UpdateDocIndexFiles call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET cannot apply this.
$lang = "dotnet"
$AppTitle = "Azure SDK for NET"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/Azure/azure-sdk-tools/blob/master/eng/common/docgeneration/Generate-DocIndex.ps1#L152

Don't we have that already? Even if we need to pass in the ".NET" as the lang explicitly in that case we can still do that. However that is still better then needing to pass in "Azure SDK for" in every language.


function Get-java-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName)
{
Expand Down Expand Up @@ -157,6 +159,8 @@ function Publish-java-GithubIODocs ($DocLocation, $PublicArtifactLocation)
}

function Get-java-GithubIoDocIndex() {
# Fill in language specific information using script.
Mutate-Files -appTitle $AppTitle -lang $Language -indexhtmlloc $IndexHtmlLoc
mitchdenny marked this conversation as resolved.
Show resolved Hide resolved
# Fetch out all package metadata from csv file.
$metadata = Get-CSVMetadata -MetadataUri $MetadataUri
# Leave the track 2 packages if multiple packages fetched out.
Expand Down