WIKI PdfExport Task YAML - rfennell/AzurePipelines GitHub Wiki

WIKI PDF Export Tasks

The 'WIKI PDF Export Tasks' package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations

WikiPdfExportTask V3

A wrapper for the AzureDevOps.WikiPDFExport

YAML snippet

# A wrapper for the AzureDevOps.WikiPDFExport
# Description - A wrapper for the [AzureDevOps.WikiPDFExport](https://github.com/MaxMelcher/AzureDevOps.WikiPDFExport)
- task: WikiPdfExportTask@3
  inputs: 
     # Required arguments
     repo: 
     localpath: $(System.DefaultWorkingDirectory)\repo
     outputFile: $(System.DefaultWorkingDirectory)\output.pdf

Arguments

  • Argument: cloneRepo
    • Description: If set to true the specified repo will be cloned to the localfolder. If false then the localfolder must specify an existing folder that already contains a file structure
    • Type: boolean
    • Required: false
    • Default (if defined): True
  • Argument: repo
  • Argument: branch
    • Description: The name of the pre-existing branch to checkout prior exporting a repo, if left blank the default branch will be used
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: singleFile
    • Description: Single file to export. Can be set as either a relative path to a file in the localPath or RootExportPath folder e.g. page.md or as fully specified path. If not set the whole WIKI is exported based on the structure details the .order file in the root of the repo
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: localpath
    • Description: The path to clone the repo into
    • Type: string
    • Required: true
    • Default (if defined): $(System.DefaultWorkingDirectory)\repo
  • Argument: rootExportPath
    • Description: If not set, this defaults to the path of the root of the cloned the repo. It can be set to a folder within the cloned repo export only part of the repo. If only a single file is required the a filename can be specified using the singleFile parameter
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: outputFile
    • Description: The output PDF file
    • Type: string
    • Required: true
    • Default (if defined): $(System.DefaultWorkingDirectory)\output.pdf
  • Argument: ExtraParameters
    • Description: Optional any extra WikiPDFExport you wish to pass to the command line tool
    • Type: string
    • Required: false
    • Default (if defined):

Authentication

  • Argument: useAgentToken
    • Description: If true use the built in agent OAUTH token. OAUTH script access must be enabled for the agent
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: user
    • Description: The username for authentication
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: password
    • Description: The password/PAT for authentication (recommended stored as secret variable)
    • Type: string
    • Required: false
    • Default (if defined):

Advanced

  • Argument: injectExtraHeader
    • Description: If set to true, credentials are passed as a header value. If false, the default, they are passed in te URL. To address #613 which is seen on some on-prem instances
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: overrideExePath
    • Description: An optional path to a previously download copy of the AzureDevOps.WikiPDFExport tool EXE (Windows) or DLL (Linux/Windows). If not set the task will download the current release of this tool e.g 'c:\myfolder\azuredevops-export-wiki.exe'
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: downloadPath
    • Description: The path the tool will be downloaded to
    • Type: string
    • Required: false
    • Default (if defined): $(Agent.TempDirectory)
  • Argument: usePreRelease
    • Description: If set to true pre-release version of the AzureDevOps.WikiPDFExport tool tool will be used
    • Type: boolean
    • Required: false
    • Default (if defined): False

WikiPdfExportTask V4

A wrapper for the AzureDevOps.WikiPDFExport

YAML snippet

# A wrapper for the AzureDevOps.WikiPDFExport
# Description - A wrapper for the [AzureDevOps.WikiPDFExport](https://github.com/MaxMelcher/AzureDevOps.WikiPDFExport)
- task: WikiPdfExportTask@4
  inputs: 
     # Required arguments
     repo: 
     localpath: $(System.DefaultWorkingDirectory)\repo
     outputFile: $(System.DefaultWorkingDirectory)\output.pdf

Arguments

  • Argument: cloneRepo
    • Description: If set to true the specified repo will be cloned to the localfolder. If false then the localfolder must specify an existing folder that already contains a file structure
    • Type: boolean
    • Required: false
    • Default (if defined): True
  • Argument: repo
  • Argument: branch
    • Description: The name of the pre-existing branch to checkout prior exporting a repo, if left blank the default branch will be used
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: singleFile
    • Description: Single file to export. Can be set as either a relative path to a file in the localPath or RootExportPath folder e.g. page.md or as fully specified path. If not set the whole WIKI is exported based on the structure details the .order file in the root of the repo
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: localpath
    • Description: The path to clone the repo into
    • Type: string
    • Required: true
    • Default (if defined): $(System.DefaultWorkingDirectory)\repo
  • Argument: rootExportPath
    • Description: If not set, this defaults to the path of the root of the cloned the repo. It can be set to a folder within the cloned repo export only part of the repo. If only a single file is required the a filename can be specified using the singleFile parameter
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: outputFile
    • Description: The output PDF file
    • Type: string
    • Required: true
    • Default (if defined): $(System.DefaultWorkingDirectory)\output.pdf
  • Argument: ExtraParameters
    • Description: Optional any extra WikiPDFExport you wish to pass to the command line tool
    • Type: string
    • Required: false
    • Default (if defined):

Authentication

  • Argument: useAgentToken
    • Description: If true use the built in agent OAUTH token. OAUTH script access must be enabled for the agent
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: user
    • Description: The username for authentication
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: password
    • Description: The password/PAT for authentication (recommended stored as secret variable)
    • Type: string
    • Required: false
    • Default (if defined):

Advanced

  • Argument: injectExtraHeader
    • Description: If set to true, credentials are passed as a header value. If false, the default, they are passed in te URL. To address #613 which is seen on some on-prem instances
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: overrideExePath
    • Description: An optional path to a previously download copy of the AzureDevOps.WikiPDFExport tool EXE (Windows) or DLL (Linux/Windows). If not set the task will download the current release of this tool e.g 'c:\myfolder\azuredevops-export-wiki.exe'
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: downloadPath
    • Description: The path the tool will be downloaded to
    • Type: string
    • Required: false
    • Default (if defined): $(Agent.TempDirectory)
  • Argument: usePreRelease
    • Description: If set to true pre-release version of the AzureDevOps.WikiPDFExport tool tool will be used
    • Type: boolean
    • Required: false
    • Default (if defined): False