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

Restructuring generate-doc code folder #5252

Merged
merged 122 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from 121 commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
7656bbf
modify the structure of generate-docs
KarishmaGhiya Sep 25, 2019
f726926
typedoc ignoreCompilerErrors
KarishmaGhiya Sep 25, 2019
969c24a
nunjucks fixed the version
KarishmaGhiya Sep 25, 2019
b2e564d
update .docsettings.yml
KarishmaGhiya Sep 25, 2019
ac628e5
modify the structure of generate-docs
KarishmaGhiya Sep 25, 2019
ba654bd
fixing rush install step
KarishmaGhiya Sep 25, 2019
d88e2fc
fixing docs.yml
KarishmaGhiya Sep 25, 2019
c7010a0
npm install
KarishmaGhiya Sep 25, 2019
381bf1c
add doc generation to the ci pipeline
KarishmaGhiya Sep 25, 2019
b17fb42
indentation fix
KarishmaGhiya Sep 25, 2019
7b514e0
fix variable type
KarishmaGhiya Sep 25, 2019
27666c6
doc generation testing
KarishmaGhiya Sep 26, 2019
178321b
doc generation testing
KarishmaGhiya Sep 26, 2019
4e9d3dd
doc generation testing
KarishmaGhiya Sep 26, 2019
d001ba9
trying to fix the path
KarishmaGhiya Sep 26, 2019
3c6f4b2
fixing args
KarishmaGhiya Sep 26, 2019
a2d3c74
script for zipping
KarishmaGhiya Sep 26, 2019
6dcef7f
reformatting
KarishmaGhiya Sep 26, 2019
b0087db
disabling rush
KarishmaGhiya Sep 26, 2019
8bf7076
resolved conflict in core-ci.yml by accepting both
KarishmaGhiya Oct 15, 2019
5d49542
resolved conflict in core-ci.yml by accepting both
KarishmaGhiya Oct 15, 2019
c4bf643
trying different args
KarishmaGhiya Sep 27, 2019
01e0440
testing parameters
KarishmaGhiya Sep 27, 2019
19b1f39
testing parameters
KarishmaGhiya Sep 27, 2019
71c44d1
core added directly
KarishmaGhiya Sep 27, 2019
4e49aef
add typedoc as a dependency
KarishmaGhiya Sep 27, 2019
5fe5314
install typedoc
KarishmaGhiya Sep 27, 2019
e5b71ba
add mkdir command
KarishmaGhiya Sep 27, 2019
327d8d6
add mkdir command
KarishmaGhiya Sep 27, 2019
793bbc0
add mkdir command
KarishmaGhiya Sep 27, 2019
349a145
uncomment everything
KarishmaGhiya Sep 27, 2019
90075cb
testing parameters
KarishmaGhiya Sep 27, 2019
a36c854
debug the inclusion list
KarishmaGhiya Sep 27, 2019
03a328e
doc args parameter broken
KarishmaGhiya Sep 27, 2019
d24b209
try someting :(
KarishmaGhiya Sep 27, 2019
809cf32
ridiculous hack to try to make this work :(
KarishmaGhiya Sep 27, 2019
b630ca2
parameter has one more level
KarishmaGhiya Sep 27, 2019
f2a7500
allow * as docArgs
KarishmaGhiya Sep 27, 2019
b54dd08
uncomment for ci to pass
KarishmaGhiya Sep 27, 2019
11af8f4
added parameters for cosmos too
KarishmaGhiya Sep 27, 2019
57feace
ci.yml files updated with DocArgs
KarishmaGhiya Sep 27, 2019
d74dc66
pathToDir will be created if docgen doesn't exist
KarishmaGhiya Sep 28, 2019
13a331d
empty folder
KarishmaGhiya Sep 28, 2019
e94e087
comment updated for args
KarishmaGhiya Oct 7, 2019
728855a
include for all packages
KarishmaGhiya Oct 7, 2019
b0e26e7
added a logging statement
KarishmaGhiya Oct 8, 2019
bad2fbb
testing docGen template for versions
KarishmaGhiya Oct 8, 2019
77df33a
doc index generation
KarishmaGhiya Oct 10, 2019
feb3f98
added pipeline for doc index generation
KarishmaGhiya Oct 10, 2019
0868a0a
changed task from cmdline to powershell to combat permission issues
KarishmaGhiya Oct 10, 2019
5248845
changed task from cmdline to powershell to combat permission issues
KarishmaGhiya Oct 10, 2019
bb0811f
added job
KarishmaGhiya Oct 10, 2019
2cf025c
Update docindex.yml for Azure Pipelines
KarishmaGhiya Oct 10, 2019
1c9b946
fixed globals path
KarishmaGhiya Oct 10, 2019
7b5ea02
wrong path rectified
KarishmaGhiya Oct 10, 2019
c8a59c9
checking with a new line character for markdown
KarishmaGhiya Oct 10, 2019
1790fe3
oldIndex variable
KarishmaGhiya Oct 10, 2019
e74900e
markdown html
KarishmaGhiya Oct 10, 2019
bc7fc34
markdown updated
KarishmaGhiya Oct 10, 2019
c52cab5
spaces uniform
KarishmaGhiya Oct 10, 2019
e34cb69
fix readme errors
KarishmaGhiya Oct 11, 2019
ef8a8e6
adding both pipelines for generating index and uploading to storage blob
KarishmaGhiya Oct 11, 2019
4ca0e16
doc-index updated
KarishmaGhiya Oct 11, 2019
bb8868d
refinement based on review suggestions - Daniel
KarishmaGhiya Oct 11, 2019
ef97e85
modified the parameters
KarishmaGhiya Oct 11, 2019
d031956
fixing changes
KarishmaGhiya Oct 11, 2019
b5fd4f3
fix path to script
KarishmaGhiya Oct 12, 2019
b68aa47
saskey modified way passing parameters
KarishmaGhiya Oct 12, 2019
b23fa32
saskey modified way passing parameters
KarishmaGhiya Oct 12, 2019
44312e2
.Name contains just file name vs the which contains full path
KarishmaGhiya Oct 12, 2019
98928d2
changed to windows agent
KarishmaGhiya Oct 12, 2019
a5984a6
removing comments
KarishmaGhiya Oct 14, 2019
8f31440
updated version extraction logic
KarishmaGhiya Oct 14, 2019
533282d
added function to the main.js template
KarishmaGhiya Oct 14, 2019
9177e67
updated doc-index pipeline
KarishmaGhiya Oct 14, 2019
2661a81
update toc.yml and index
KarishmaGhiya Oct 14, 2019
3c7b80c
add target blank
KarishmaGhiya Oct 14, 2019
9940a26
updated main.js
KarishmaGhiya Oct 15, 2019
7610b93
changed location of readme
KarishmaGhiya Oct 15, 2019
de00038
reverted location
KarishmaGhiya Oct 15, 2019
506a496
modified the index to load list of services and different pages for e…
KarishmaGhiya Oct 16, 2019
8841841
write file async version
KarishmaGhiya Oct 16, 2019
7b6bd6a
code for dropdown version selector
KarishmaGhiya Oct 17, 2019
ae9e5b9
add display none to html component
KarishmaGhiya Oct 17, 2019
ded6b69
disable npm install in typedoc script and increase pipeline execution…
KarishmaGhiya Oct 17, 2019
be77015
removing rush install and isRush checks
KarishmaGhiya Oct 17, 2019
464a842
removing rush install and isRush checks
KarishmaGhiya Oct 17, 2019
3375c13
removes commwnts
KarishmaGhiya Oct 17, 2019
23f78be
deleted garbage keyvault js files that secretly got committed
KarishmaGhiya Oct 17, 2019
9a897b9
WIP for async changes
KarishmaGhiya Oct 17, 2019
2e9a7dc
Update header.hbs to remove display-none
KarishmaGhiya Oct 17, 2019
ff036fe
added path to theme in the script
KarishmaGhiya Oct 17, 2019
1cd950c
tried to parallelize to some extent
KarishmaGhiya Oct 18, 2019
a6217e7
converted all file sync functions to async versions
KarishmaGhiya Oct 18, 2019
877e909
improved parallelization of typedoc commands and added css files
KarishmaGhiya Oct 18, 2019
0a16c71
fixed the versioning picked up incorrectly
KarishmaGhiya Oct 18, 2019
2eac7dd
modified the css that actually works
KarishmaGhiya Oct 18, 2019
4accf74
service-mapper json
KarishmaGhiya Oct 19, 2019
bb40ab3
doc index service and styling changes
KarishmaGhiya Oct 21, 2019
001117c
doc-index.yml index updated with readme
KarishmaGhiya Oct 21, 2019
30b43fb
update docfx.json
KarishmaGhiya Oct 21, 2019
0eb09ed
complete refinement of css and index
KarishmaGhiya Oct 22, 2019
6f577a2
removed console.log(settings)
KarishmaGhiya Oct 22, 2019
b935e17
no idea how this became binary
KarishmaGhiya Oct 22, 2019
df0e09a
somehow this file got deleted
KarishmaGhiya Oct 22, 2019
428e52c
use plimit library to limit the concurrency for typedoc script and re…
KarishmaGhiya Oct 22, 2019
19a658a
generate-doc jquery added
KarishmaGhiya Oct 23, 2019
14f278d
back to index link
KarishmaGhiya Oct 23, 2019
b0107e4
Readme relative link cleanup
KarishmaGhiya Oct 24, 2019
ce7db0d
added step for replacing relative links
KarishmaGhiya Oct 24, 2019
324ddd6
added defaults to archetype yaml
KarishmaGhiya Oct 24, 2019
380c107
Incorporated review suggestions
KarishmaGhiya Oct 24, 2019
3b9ffb3
reverted the change
KarishmaGhiya Oct 24, 2019
752be76
deal with cognitiveservices later
KarishmaGhiya Oct 24, 2019
b632287
deleting thisfile in favor of the yaml under azure-sdk-build-tools
KarishmaGhiya Oct 24, 2019
03d22d3
suggested changes to ci
KarishmaGhiya Oct 24, 2019
23a8643
added exit code on error to generat-doc script
KarishmaGhiya Oct 24, 2019
658fef7
updated cosmos yaml to remove docArgs
KarishmaGhiya Oct 25, 2019
dae823a
cleanup of DocArgs references
KarishmaGhiya Oct 25, 2019
66f08b2
add quotes
KarishmaGhiya Oct 25, 2019
e36f459
removed extra bracket
KarishmaGhiya Oct 25, 2019
c817312
changed the storage blob link to point to real one
KarishmaGhiya Oct 25, 2019
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
2 changes: 2 additions & 0 deletions .docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ omitted_paths:
- documentation/ServicePrincipal/*
- eng/tools/analyze-deps/**
- eng/tools/select-packages/**
- eng/tools/generate-doc/**
- eng/tools/generate-static-index/**
- "sdk/*/arm-*"
- "sdk/cognitiveservices/*"
- "sdk/identity/identity/test/manual/*"
Expand Down
278 changes: 0 additions & 278 deletions common/scripts/generate-doc.js

This file was deleted.

60 changes: 60 additions & 0 deletions eng/pipelines/doc-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
jobs:
- job: "Build"
variables:
- template: templates/variables/globals.yml
pool:
vmImage: "windows-2019"
steps:
- pwsh: |
Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v2.43.2/docfx.zip" `
-OutFile "docfx.zip" | Wait-Process; Expand-Archive -Path "docfx.zip" -DestinationPath "./docfx/"
workingDirectory: $(Build.BinariesDirectory)
displayName: Download and Extract DocFX

- pwsh: |
$(Build.BinariesDirectory)/docfx/docfx.exe init -q
displayName: Provision DocFX Directory
workingDirectory: $(Build.SourcesDirectory)

- pwsh: |
mkdir "templates"
KarishmaGhiya marked this conversation as resolved.
Show resolved Hide resolved
displayName: Create Template Directory
workingDirectory: $(Build.SourcesDirectory)/docfx_project/

- pwsh: |
Copy-Item "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/docfx.json" -Destination "$(Build.SourcesDirectory)/docfx_project/" -Force
displayName: Copy over docfx.json

- script: |
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you are doing a lot of one line script or pswh commands you should consider consolidating them into a smaller number of pwsh or script steps.

Copy link
Member Author

Choose a reason for hiding this comment

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

So the way we have them right now is we have segregated the steps based on the logical purpose and also if there are any failures we can identify them easily

npm install
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-static-index
displayName: "Install tool dependencies"

- pwsh: |
node $(Build.SourcesDirectory)/eng/tools/generate-static-index/index.js
displayName: "Generate Index Toc"

- pwsh: |
New-Item -Path "$(Build.SourcesDirectory)/docfx_project" -Name "toc.yml" -Force
Add-Content -Path "$(Build.SourcesDirectory)/docfx_project/toc.yml" -Value "- name: Azure SDK for JavaScript APIs`r`n href: api/`r`n homepage: api/index.md"
Copy-Item "$(Build.SourcesDirectory)/README.md" -Destination "$(Build.SourcesDirectory)/docfx_project/api/index.md" -Force
Copy-Item "$(Build.SourcesDirectory)/README.md" -Destination "$(Build.SourcesDirectory)/docfx_project/index.md" -Force
displayName: Update toc.yml and index

- pwsh: |
$(Build.BinariesDirectory)/docfx/docfx.exe build
displayName: Build Doc Content
workingDirectory: $(Build.SourcesDirectory)/docfx_project/

- pwsh: |
Copy-Item "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/assets/*" -Destination "$(Build.SourcesDirectory)/docfx_project/_site/" -Force
Get-Content "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/main.js" |Out-File "$(Build.SourcesDirectory)/docfx_project/_site/styles/main.js"
Get-Content "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/docfx.css" |Out-File "$(Build.SourcesDirectory)/docfx_project/_site/styles/docfx.css"
Copy-Item "$(Build.SourcesDirectory)/docfx_project/*" -Destination "$(Build.ArtifactStagingDirectory)/docfx_project/" -Recursive -Force
displayName: Replace site assets and Copy HTML to Artifacts Directory

- task: PublishPipelineArtifact@0
condition: succeeded()
inputs:
artifactName: "Doc.Index"
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site
17 changes: 5 additions & 12 deletions eng/pipelines/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Pipeline variables:
# $(additionalArgs) eg : -i "exc" --exc arm-advisor arm-apimanagement OR -i "inc" --inc arm-advisor arm-apimanagement
# $(additionalArgs) eg : -i "exc" --exc advisor apimanagement OR -i "inc" --inc advisor apimanagement storage OR -i "inc" --inc eventhub --clientOnly

trigger:
- master
Expand Down Expand Up @@ -34,20 +34,13 @@ jobs:
displayName: "Install typedoc"

- script: |
npm install nunjucks
displayName: "Install nunjucks"

- script: |
npm install fs-extra
displayName: "Install fs-extra"

- script: |
npm install yargs
displayName: "Install yargs"
npm install
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-doc
displayName: "Install tool dependencies"

- pwsh: |
cd $(Build.SourcesDirectory)
node .\common\scripts\generate-doc.js --dgOp "dg" $(additionalArgs)
node .\eng\tools\generate-doc\index.js --dgOp "dg" $(additionalArgs)
Copy link
Member

Choose a reason for hiding this comment

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

We can still build the docs in the old methodology correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we can. I need to add another arg --oldIndex and pass empty quotes with the exclude list

Copy-Item -Path $(Build.SourcesDirectory)/docGen/* -Destination $(Build.ArtifactStagingDirectory) -Recurse -Force
displayName: "Generate Typedoc Docs"

Expand Down
Loading