Skip to content

GenerateReleaseNotes Node based Cross Platform Task YAML

rfennell edited this page Oct 22, 2020 · 56 revisions

Generate Release Notes (Crossplatform)

The 'Generate Release Notes (Crossplatform)' package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations

XplatGenerateReleaseNotes V2

Generates a release notes file in a format of your choice from the build or release history

YAML snippet

# Generate Release Notes (Crossplatform)
# Description - Generates a release notes file in a format of your choice from the build or release history
- task: XplatGenerateReleaseNotes@2
  inputs: 
     # Required arguments
     outputfile: 
     templateLocation: File
     templatefile: 
     inlinetemplate: 
     delimiter: :
     fieldEquality: =
     anyFieldContent: *
     dumpPayloadToConsole: false
     dumpPayloadToFile: false
     replaceFile: True
     appendToFile: True
     getParentsAndChildren: False

Arguments

  • Argument: outputfile
    • Description: The name of the Markdown file to export e.g. $(Build.ArtifactStagingDirectory)\releasenotes.md if within a build workflow
    • Type: string
    • Required: true
    • Default (if defined):
  • Argument: templateLocation
    • Description: Select the template file source, file in source control or in line.
    • Type: pickList
    • Required: true
    • Default (if defined): File
  • Argument: templatefile
    • Description: The name of the Markdown template.
    • Type: filePath
    • Required: true
    • Default (if defined):
  • Argument: inlinetemplate
    • Description: The Markdown template.
    • Type: multiLine
    • Required: true
    • Default (if defined):
  • Argument: replaceFile
    • Description: Replace the output file
    • Type: boolean
    • Required: true
    • Default (if defined): True
  • Argument: appendToFile
    • Description: Append to end of file in the output file if not replacing file
    • Type: boolean
    • Required: true
    • Default (if defined): True

Advanced

  • Argument: emptySetText
    • Description: This is the text that will be placed in the generated release notes if there are no work items or changesets/commits.
    • Type: string
    • Required: false
    • Default (if defined): None
  • Argument: delimiter
    • Description: The delimiter is used to separate field filter and tags in the @@WILOOP:TAG1:TAG2@@ block markers. Default is :
    • Type: string
    • Required: true
    • Default (if defined): :
  • Argument: fieldEquality
    • Description: The field equality symbol used to in field filter e.g. @@WILOOP:System.Title=123@@ block markers. The default is =
    • Type: string
    • Required: true
    • Default (if defined): =
  • Argument: anyFieldContent
    • Description: The value to put in WILOOP constructs to match any contents e.g. @@WILOOP:System.Title=*@@. The default is *
    • Type: string
    • Required: true
    • Default (if defined): *
  • Argument: overrideStageName
    • Description: If set uses this stage name to find the last successful deployment, as opposed to the currently active stage (Release usage only)
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: stopOnRedeploy
    • Description: Do not generate release notes of a re-deploy. If this is set, and a re-deploy occurs the task will succeeds with a warning
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: sortWi
    • Description: If true will sort work items by type, if false then it will leave the work items in default order
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: showOnlyPrimary
    • Description: If true only show WI/CS associated with primary release artifact
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: searchCrossProjectForPRs
    • Description: If true will try to match commits to Azure DevOps PR cross project within the organisation, if false only searches the Team Project
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: gitHubPat
    • Description: To expand commit messages stored in a private GitHub repos a PAT needs to be provided, it is not required for repo stored in Azure DevOps or public GitHub repos
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: dumpPayloadToConsole
    • Description: If true the data objects passed to the file generator is dumped to the log
    • Type: boolean
    • Required: true
    • Default (if defined): false
  • Argument: dumpPayloadToFile
    • Description: If true the data objects passed to the file generator is dumped to a JSON file
    • Type: boolean
    • Required: true
    • Default (if defined): false
  • Argument: dumpPayloadFileName
    • Description: The filename to dump the data objects passed to the file generator
    • Type: string
    • Required: false
    • Default (if defined): $(Build.ArtifactStagingDirectory)\payload.json

Handlebars

  • Argument: customHandlebarsExtensionCode
    • Description: A custom Handlebars extension written as a JavaScript module e.g. module.exports = {foo: function () {return 'Returns foo';}};
    • Type: multiLine
    • Required: false
    • Default (if defined):
  • Argument: getParentsAndChildren
    • Description: Find the parents and child workitems for any workitems associated with a build
    • Type: boolean
    • Required: true
    • Default (if defined): False

Outputs

  • Argument: outputVariableName
    • Description: The name of the variable that the markdown output should be assigned to for use later in your workflow.
    • Type: string
    • Required: false
    • Default (if defined):

XplatGenerateReleaseNotes V3

Generates a release notes file in a format of your choice from the build or release history

YAML snippet

# Generate Release Notes (Crossplatform)
# Description - Generates a release notes file in a format of your choice from the build or release history
- task: XplatGenerateReleaseNotes@3
  inputs: 
     # Required arguments
     outputfile: 
     templateLocation: File
     templatefile: 
     inlinetemplate: 
     dumpPayloadToConsole: false
     dumpPayloadToFile: false
     replaceFile: True
     appendToFile: True
     getParentsAndChildren: False
     getAllParents: False

Arguments

  • Argument: outputfile
    • Description: The name of the Markdown file to export e.g. $(Build.ArtifactStagingDirectory)/releasenotes.md if within a build workflow
    • Type: string
    • Required: true
    • Default (if defined):
  • Argument: templateLocation
    • Description: Select the template file source, file in source control or in line.
    • Type: pickList
    • Required: true
    • Default (if defined): File
  • Argument: templatefile
    • Description: The name of the Markdown template.
    • Type: filePath
    • Required: true
    • Default (if defined):
  • Argument: inlinetemplate
    • Description: The Markdown template.
    • Type: multiLine
    • Required: true
    • Default (if defined):
  • Argument: checkStage
    • Description: If true a comparison is made against the last build that was successful to the current stage, or overrideStageName if specified (Build Only, for this to work the stage name must be unique in the pipeline)
    • Type: boolean
    • Required: false
    • Default (if defined): false
  • Argument: replaceFile
    • Description: Replace the output file
    • Type: boolean
    • Required: true
    • Default (if defined): True
  • Argument: appendToFile
    • Description: Append to end of file in the output file if not replacing file
    • Type: boolean
    • Required: true
    • Default (if defined): True

Advanced

  • Argument: overrideStageName
    • Description: If set uses this stage name to find the last successful deployment, as opposed to the currently active stage
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: stopOnRedeploy
    • Description: Do not generate release notes of a re-deploy. If this is set, and a re-deploy occurs the task will succeeds with a warning
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: sortWi
    • Description: If true will sort work items by type, if false then it will leave the work items in default order
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: showOnlyPrimary
    • Description: If true only show WI/CS associated with primary release artifact
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: searchCrossProjectForPRs
    • Description: If true will try to match commits to Azure DevOps PR cross project within the organisation, if false only searches the Team Project
    • Type: boolean
    • Required: false
    • Default (if defined): False
  • Argument: gitHubPat
    • Description: To expand commit messages stored in a private GitHub repos a PAT needs to be provided, it is not required for repo stored in Azure DevOps or public GitHub repos
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: bitbucketUser
    • Description: To expand commit messages stored in a private Bitbucket repos a user and app secret need to be provided, it is not required for repo stored in Azure DevOps or public Bitbucket repos
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: bitbucketSecret
    • Description: To expand commit messages stored in a private Bitbucket repos a user and app secret need to be provided, it is not required for repo stored in Azure DevOps or public Bitbucket repos
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: dumpPayloadToConsole
    • Description: If true the data objects passed to the file generator is dumped to the log
    • Type: boolean
    • Required: true
    • Default (if defined): false
  • Argument: dumpPayloadToFile
    • Description: If true the data objects passed to the file generator is dumped to a JSON file
    • Type: boolean
    • Required: true
    • Default (if defined): false
  • Argument: dumpPayloadFileName
    • Description: The filename to dump the data objects passed to the file generator
    • Type: string
    • Required: false
    • Default (if defined): $(Build.ArtifactStagingDirectory)/payload.json
  • Argument: getParentsAndChildren
    • Description: Find the parents and child workitems for any workitems associated with a build
    • Type: boolean
    • Required: true
    • Default (if defined): False
  • Argument: getAllParents
    • Description: Find the parents all workitems associated with a build, recursing back to workitem with no parents e.g. up to Epics
    • Type: boolean
    • Required: true
    • Default (if defined): False
  • Argument: tags
    • Description: A comma separated list of pipeline tags that must all be matched when looking for previous successful builds, only used if checkStage=true
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: overridePat
    • Description: It is possible to inject a Personal Access Token to use in place of the Build Agent OAUTH token. This option will only be used in very rare situations usually after a support issue has been raised
    • Type: string
    • Required: false
    • Default (if defined):
  • Argument: overrideBuildReleaseId
    • Description: For releases or multi-stage YAML this parameter provides a means to set the ID of the 'last good release' to compare against. If the specified release/build is not found then the task will exit with an error. Default is empty/not set disabling this override behaviour
    • Type: string
    • Required: false
    • Default (if defined):

Handlebars

  • Argument: customHandlebarsExtensionCode
    • Description: A custom Handlebars extension written as a JavaScript module e.g. module.exports = {foo() {return 'Returns foo';}};
    • Type: multiLine
    • Required: false
    • Default (if defined):
  • Argument: customHandlebarsExtensionFile
    • Description: The filename (without extension) for any custom Handlebars extension written
    • Type: string
    • Required: false
    • Default (if defined): customHandlebarsExtension
  • Argument: customHandlebarsExtensionFolder
    • Description: The folder to save custom Handlebars extension file. If empty defaults to customHandlebarsExtensionFolder the agents temp folder '${process.env.AGENT_WORKFOLDER}/_temp'
    • Type: string
    • Required: false
    • Default (if defined):

Outputs

  • Argument: outputVariableName
    • Description: The name of the variable that the markdown output should be assigned to for use later in your workflow.
    • Type: string
    • Required: false
    • Default (if defined):
Clone this wiki locally