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

$(Build.*) variables are not replaced when using a file based template. Works with inline template. #456

Closed
wpschaub opened this issue Mar 12, 2019 · 8 comments

Comments

@wpschaub
Copy link

commented Mar 12, 2019

Azure DevOps Extension you are using

Generate Release Notes (Crossplatform)

Where are you running it?

  • Azure DevOps Service (VSTS)

Version of Extension/Task

2.8.1

Expected behaviour and actual behavior

When switching from an inline to a file based template, none of the $(Build._) variables are replaced in the output markdown file. In the task log the Build variables are replaced, however, in the final markdown file the values revert back to the $(Build.) tokens.

Steps to reproduce the problem

  • Use template below inline. Build variables are replaced.
  • use template bellow as a file. Build variables are not replaced.

Template

![worksafebc.jpg](/.attachments/worksafebc-47debfb6-cf0a-4160-bb34-3cc4dc4bdf96.jpg =250x)
WORKLOAD TRANSITION

[[TOC]]

Release Notes

RELEASE BUILD
Definition Name ${releaseDetails.releaseDefinition.name} $(Build.DefinitionName)
Definition ID ${releaseDetails.releaseDefinition.id} $(Build.DefinitionId)
Current Name ${releaseDetails.name} $(Build.BuildNumber)
URL ${releaseDetails._links.web.href} N/A
Completed ${releaseDetails.modifiedOn} N/A
Compared with ${compareReleaseDetails.name} N/A
Source Branch N/A $(Build.SourceBranchName)

Technical Description

@@WILOOP:Release Notes:RN-TECH-SUMMARY@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-TECH-SUMMARY@@

Bueinsss Description

@@WILOOP:Release Notes:RN-BUSINESS-BLURB@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-BUSINESS-BLURB@@

Dependencies

@@WILOOP:Release Notes:RN-DEPENDENIES@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-DEPENDENIES@@

Known Issues

@@WILOOP:Release Notes:RN-KNOWN-ISSUES@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-KNOWN-ISSUES@@

Technical Debt

@@WILOOP:Release Notes:RN-TECH-DEBT@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-TECH-DEBT@@

Fallback Plan

@@WILOOP:Release Notes:RN-FALLBACK-PLAN@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-FALLBACK-PLAN@@


Associated Artifacts

Associated work items

@@WILOOP@@

  • #${widetail.id}
    @@WILOOP@@

Associated commits

@@Csloop@@

  • **ID ${csdetail.id} ** ${csdetail.message}
    @@Csloop@@

Log

2019-03-12T17:06:33.9728784Z ##[debug]Evaluating condition for step: 'Generate Release Notes based on Release Comparision API'
2019-03-12T17:06:33.9729629Z ##[debug]Evaluating: succeeded()
2019-03-12T17:06:33.9729917Z ##[debug]Evaluating succeeded:
2019-03-12T17:06:33.9730202Z ##[debug]=> True
2019-03-12T17:06:33.9730528Z ##[debug]Result: True
2019-03-12T17:06:33.9730839Z ##[section]Starting: Generate Release Notes based on Release Comparision API
2019-03-12T17:06:33.9851397Z ==============================================================================
2019-03-12T17:06:33.9851679Z Task : Generate Release Notes XPlatform
2019-03-12T17:06:33.9851773Z Description : Generates a release notes file in a format of your choice from the release history
2019-03-12T17:06:33.9851877Z Version : 2.8.1
2019-03-12T17:06:33.9852154Z Author : Black Marble
2019-03-12T17:06:33.9852244Z Help : Version: 2.8.1. More Information
2019-03-12T17:06:33.9852390Z ==============================================================================
2019-03-12T17:06:34.2308538Z ##[debug]agent.TempDirectory=D:\a_temp
2019-03-12T17:06:34.2337723Z ##[debug]loading inputs and endpoints
2019-03-12T17:06:34.2345497Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2019-03-12T17:06:34.2358305Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2019-03-12T17:06:34.2361020Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2019-03-12T17:06:34.2363831Z ##[debug]loading INPUT_DELIMITER
2019-03-12T17:06:34.2366054Z ##[debug]loading INPUT_EMPTYSETTEXT
2019-03-12T17:06:34.2368126Z ##[debug]loading INPUT_INLINETEMPLATE
2019-03-12T17:06:34.2369961Z ##[debug]loading INPUT_OUTPUTFILE
2019-03-12T17:06:34.2373450Z ##[debug]loading INPUT_TEMPLATEFILE
2019-03-12T17:06:34.2375648Z ##[debug]loading INPUT_TEMPLATELOCATION
2019-03-12T17:06:34.2384434Z ##[debug]loaded 9
2019-03-12T17:06:34.2399827Z ##[debug]Agent.ProxyUrl=undefined
2019-03-12T17:06:34.2402247Z ##[debug]Agent.CAInfo=undefined
2019-03-12T17:06:34.2402661Z ##[debug]Agent.ClientCert=undefined
2019-03-12T17:06:34.2403268Z ##[debug]Agent.SkipCertValidation=undefined
2019-03-12T17:06:34.4377632Z ##[debug]Starting Tag XplatGenerateReleaseNotes task
2019-03-12T17:06:34.4378036Z ##[debug]System.TeamFoundationCollectionUri=https://wcbbc.visualstudio.com/
2019-03-12T17:06:34.4378270Z ##[debug]System.TeamProject=Cloud-WLT
2019-03-12T17:06:34.4378583Z ##[debug]Release.ReleaseId=965
2019-03-12T17:06:34.4379277Z ##[debug]Release.DefinitionId=45
2019-03-12T17:06:34.4381622Z ##[debug]overrideStageName=null
2019-03-12T17:06:34.4381826Z ##[debug]Release_EnvironmentName=Development
2019-03-12T17:06:34.4390562Z ##[debug]templateLocation=File
2019-03-12T17:06:34.4393149Z ##[debug]templatefile=D:\a\r1\a\ReleaseNotesTemplate.mk
2019-03-12T17:06:34.4395688Z ##[debug]inlinetemplate=![worksafebc.jpg](/.attachments/worksafebc-47debfb6-cf0a-4160-bb34-3cc4dc4bdf96.jpg =250x)
WORKLOAD TRANSITION

[[TOC]]

Release Notes

RELEASE BUILD
Definition Name ${releaseDetails.releaseDefinition.name} Claims.WRC.Web-DV-RN-CLONE
Definition ID ${releaseDetails.releaseDefinition.id} 688
Current Name ${releaseDetails.name} 20190312.2
URL ${releaseDetails._links.web.href} N/A
Completed ${releaseDetails.modifiedOn} N/A
Compared with ${compareReleaseDetails.name} N/A
Source Branch N/A master

Technical Description

@@WILOOP:Release Notes:RN-TECH-SUMMARY@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-TECH-SUMMARY@@

Bueinsss Description

@@WILOOP:Release Notes:RN-BUSINESS-BLURB@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-BUSINESS-BLURB@@

Dependencies

@@WILOOP:Release Notes:RN-DEPENDENIES@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-DEPENDENIES@@

Known Issues

@@WILOOP:Release Notes:RN-KNOWN-ISSUES@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-KNOWN-ISSUES@@

Technical Debt

@@WILOOP:Release Notes:RN-TECH-DEBT@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-TECH-DEBT@@

Fallback Plan

@@WILOOP:Release Notes:RN-FALLBACK-PLAN@@
${widetail.fields['System.Description']}
@@WILOOP:Release Notes:RN-FALLBACK-PLAN@@


Associated Artifacts

Associated work items

@@WILOOP@@

  • #${widetail.id}
    @@WILOOP@@

Associated commits

@@Csloop@@

  • ID ${csdetail.id} ** ${csdetail.message}
    @@Csloop@@
    2019-03-12T17:06:34.4399623Z ##[debug]outputfile=D:\a\r1\a/ReleaseNotes.md
    2019-03-12T17:06:34.4399970Z ##[debug]outputVariableName=null
    2019-03-12T17:06:34.4401033Z ##[debug]emptySetText=None
    2019-03-12T17:06:34.4403186Z ##[debug]delimiter=:
    2019-03-12T17:06:34.4404887Z ##[debug]System.AccessToken=
    *
    2019-03-12T17:06:34.4405118Z ##[debug]Creating the credential handler
    2019-03-12T17:06:34.4475759Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4476896Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4477495Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4477857Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4478167Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4478478Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4478774Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4479084Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:34.4479574Z (node:4184) Warning: Use Cipheriv for counter mode of aes-256-ctr
    2019-03-12T17:06:35.4605064Z Getting the current release details
    2019-03-12T17:06:35.7263157Z Getting the Environment Id
    2019-03-12T17:06:35.7264219Z Identified [development] as having id [174]
    2019-03-12T17:06:35.8545268Z Getting all artifacts in the current release...
    2019-03-12T17:06:35.8548538Z Found 1
    2019-03-12T17:06:35.9414396Z Getting all artifacts in the most recent successful release [Release-17]...
    2019-03-12T17:06:35.9415029Z Found 1
    2019-03-12T17:06:35.9415410Z Looking at artifact [_Claims.WRC.Web-DV-RN-CLONE]
    2019-03-12T17:06:35.9415814Z Artifact type [Build]
    2019-03-12T17:06:35.9416319Z Build Definition ID [688]
    2019-03-12T17:06:35.9416601Z Build Number: [20190312.2]
    2019-03-12T17:06:35.9416889Z Looking for the [_Claims.WRC.Web-DV-RN-CLONE] in the most recent successful release [Release-17]
    2019-03-12T17:06:35.9417400Z Found artifact [_Claims.WRC.Web-DV-RN-CLONE] with build number [20190312.2] in release [Release-17]
    2019-03-12T17:06:35.9417729Z Build for artifact [_Claims.WRC.Web-DV-RN-CLONE] has not changed. Nothing to do
    2019-03-12T17:06:35.9418047Z Detected 0 commits/changesets and 0 workitems between the builds.
    2019-03-12T17:06:35.9418322Z
    2019-03-12T17:06:35.9423349Z Expanding the truncated commit messages...
    2019-03-12T17:06:35.9423977Z Finished expanding [0] commits.
    2019-03-12T17:06:35.9430945Z Total commits: [0]
    2019-03-12T17:06:35.9431442Z Total workitems: [0]
    2019-03-12T17:06:35.9431985Z ##[debug]Using template mode File
    2019-03-12T17:06:35.9432528Z Loading template file D:\a\r1\a\ReleaseNotesTemplate.mk
    2019-03-12T17:06:35.9440275Z ##[debug]Processing template
    2019-03-12T17:06:35.9442082Z ##[debug] Added 0 items to queue for BODY
    2019-03-12T17:06:35.9442622Z ##[debug] Processing Line No: 1
    2019-03-12T17:06:35.9444340Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9445776Z ##[debug] Processing Line No: 2
    2019-03-12T17:06:35.9446610Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9447123Z ##[debug] Processing Line No: 3
    2019-03-12T17:06:35.9447586Z ##[debug] Outputing a blank line
    2019-03-12T17:06:35.9447961Z ##[debug] Processing Line No: 4
    2019-03-12T17:06:35.9448368Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9449826Z ##[debug] Processing Line No: 5
    2019-03-12T17:06:35.9450191Z ##[debug] Outputing a blank line
    2019-03-12T17:06:35.9450541Z ##[debug] Processing Line No: 6
    2019-03-12T17:06:35.9450924Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9451275Z ##[debug] Processing Line No: 7
    2019-03-12T17:06:35.9451601Z ##[debug] Outputing a blank line
    2019-03-12T17:06:35.9451950Z ##[debug] Processing Line No: 8
    2019-03-12T17:06:35.9452294Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9452624Z ##[debug] Processing Line No: 9
    2019-03-12T17:06:35.9452965Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9453297Z ##[debug] Processing Line No: 10
    2019-03-12T17:06:35.9453644Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9454014Z ##[debug] Processing Line No: 11
    2019-03-12T17:06:35.9454361Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9454717Z ##[debug] Processing Line No: 12
    2019-03-12T17:06:35.9455749Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9456587Z ##[debug] Processing Line No: 13
    2019-03-12T17:06:35.9457021Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9457710Z ##[debug] Processing Line No: 14
    2019-03-12T17:06:35.9458336Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9463270Z ##[debug] Processing Line No: 15
    2019-03-12T17:06:35.9463834Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9464346Z ##[debug] Processing Line No: 16
    2019-03-12T17:06:35.9464799Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9465244Z ##[debug] Processing Line No: 17
    2019-03-12T17:06:35.9465665Z ##[debug] Outputing a blank line
    2019-03-12T17:06:35.9466474Z ##[debug] Processing Line No: 18
    2019-03-12T17:06:35.9466838Z ##[debug] Nothing to expand, just process the line
    2019-03-12T17:06:35.9467238Z ##[debug] Processing Line No: 19
    2019-03-12T17:06:35.9467638Z ##[debug] Starting block @@WILOOP:Release Notes:RN-TECH-SUMMARY@@

2019-03-12T17:06:35.9468586Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9468938Z ##[debug] Added 0 items to queue for @@WILOOP:Release Notes:RN-TECH-SUMMARY@@

2019-03-12T17:06:35.9469555Z ##[debug] Processing Line No: 20
2019-03-12T17:06:35.9469897Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9470412Z ##[debug] Processing Line No: 21
2019-03-12T17:06:35.9470746Z ##[debug] Ending block @@WILOOP:Release Notes:RN-TECH-SUMMARY@@
2019-03-12T17:06:35.9471115Z ##[debug] Processing Line No: 22
2019-03-12T17:06:35.9471448Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9471794Z ##[debug] Processing Line No: 23
2019-03-12T17:06:35.9472181Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9472898Z ##[debug] Processing Line No: 24
2019-03-12T17:06:35.9473328Z ##[debug] Starting block @@WILOOP:Release Notes:RN-BUSINESS-BLURB@@

2019-03-12T17:06:35.9475629Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9476381Z ##[debug] Added 0 items to queue for @@WILOOP:Release Notes:RN-BUSINESS-BLURB@@

2019-03-12T17:06:35.9476838Z ##[debug] Processing Line No: 25
2019-03-12T17:06:35.9477174Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9477525Z ##[debug] Processing Line No: 26
2019-03-12T17:06:35.9483121Z ##[debug] Ending block @@WILOOP:Release Notes:RN-BUSINESS-BLURB@@
2019-03-12T17:06:35.9484110Z ##[debug] Processing Line No: 27
2019-03-12T17:06:35.9484617Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9485029Z ##[debug] Processing Line No: 28
2019-03-12T17:06:35.9503081Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9503871Z ##[debug] Processing Line No: 29
2019-03-12T17:06:35.9504557Z ##[debug] Starting block @@WILOOP:Release Notes:RN-DEPENDENIES@@

2019-03-12T17:06:35.9505139Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9505552Z ##[debug] Added 0 items to queue for @@WILOOP:Release Notes:RN-DEPENDENIES@@

2019-03-12T17:06:35.9506215Z ##[debug] Processing Line No: 30
2019-03-12T17:06:35.9506575Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9506914Z ##[debug] Processing Line No: 31
2019-03-12T17:06:35.9507269Z ##[debug] Ending block @@WILOOP:Release Notes:RN-DEPENDENIES@@
2019-03-12T17:06:35.9507605Z ##[debug] Processing Line No: 32
2019-03-12T17:06:35.9508116Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9508458Z ##[debug] Processing Line No: 33
2019-03-12T17:06:35.9508782Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9509576Z ##[debug] Processing Line No: 34
2019-03-12T17:06:35.9509925Z ##[debug] Starting block @@WILOOP:Release Notes:RN-KNOWN-ISSUES@@

2019-03-12T17:06:35.9510739Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9511111Z ##[debug] Added 0 items to queue for @@WILOOP:Release Notes:RN-KNOWN-ISSUES@@

2019-03-12T17:06:35.9511556Z ##[debug] Processing Line No: 35
2019-03-12T17:06:35.9511920Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9512651Z ##[debug] Processing Line No: 36
2019-03-12T17:06:35.9513383Z ##[debug] Ending block @@WILOOP:Release Notes:RN-KNOWN-ISSUES@@
2019-03-12T17:06:35.9513849Z ##[debug] Processing Line No: 37
2019-03-12T17:06:35.9514269Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9514675Z ##[debug] Processing Line No: 38
2019-03-12T17:06:35.9574051Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9574699Z ##[debug] Processing Line No: 39
2019-03-12T17:06:35.9575167Z ##[debug] Starting block @@WILOOP:Release Notes:RN-TECH-DEBT@@

2019-03-12T17:06:35.9575705Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9576254Z ##[debug] Added 0 items to queue for @@WILOOP:Release Notes:RN-TECH-DEBT@@

2019-03-12T17:06:35.9577123Z ##[debug] Processing Line No: 40
2019-03-12T17:06:35.9577485Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9577838Z ##[debug] Processing Line No: 41
2019-03-12T17:06:35.9578169Z ##[debug] Ending block @@WILOOP:Release Notes:RN-TECH-DEBT@@
2019-03-12T17:06:35.9578628Z ##[debug] Processing Line No: 42
2019-03-12T17:06:35.9579362Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9579695Z ##[debug] Processing Line No: 43
2019-03-12T17:06:35.9580044Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9580375Z ##[debug] Processing Line No: 44
2019-03-12T17:06:35.9580725Z ##[debug] Starting block @@WILOOP:Release Notes:RN-FALLBACK-PLAN@@

2019-03-12T17:06:35.9581164Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9581507Z ##[debug] Added 0 items to queue for @@WILOOP:Release Notes:RN-FALLBACK-PLAN@@

2019-03-12T17:06:35.9581955Z ##[debug] Processing Line No: 45
2019-03-12T17:06:35.9582811Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9583285Z ##[debug] Processing Line No: 46
2019-03-12T17:06:35.9583723Z ##[debug] Ending block @@WILOOP:Release Notes:RN-FALLBACK-PLAN@@
2019-03-12T17:06:35.9584121Z ##[debug] Processing Line No: 47
2019-03-12T17:06:35.9584527Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9584931Z ##[debug] Processing Line No: 48
2019-03-12T17:06:35.9585323Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9598096Z ##[debug] Processing Line No: 49
2019-03-12T17:06:35.9598620Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9599150Z ##[debug] Processing Line No: 50
2019-03-12T17:06:35.9599485Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9599996Z ##[debug] Processing Line No: 51
2019-03-12T17:06:35.9600350Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9600670Z ##[debug] Processing Line No: 52
2019-03-12T17:06:35.9601077Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9601398Z ##[debug] Processing Line No: 53
2019-03-12T17:06:35.9601924Z ##[debug] Starting block @@WILOOP@@

2019-03-12T17:06:35.9602923Z ##[debug] Adding all WI
2019-03-12T17:06:35.9603399Z ##[debug] There are 0 WI to add
2019-03-12T17:06:35.9603838Z ##[debug] Added 0 items to queue for @@WILOOP@@

2019-03-12T17:06:35.9604343Z ##[debug] Processing Line No: 54
2019-03-12T17:06:35.9604751Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9605206Z ##[debug] Processing Line No: 55
2019-03-12T17:06:35.9605656Z ##[debug] Ending block @@WILOOP@@
2019-03-12T17:06:35.9606231Z ##[debug] Processing Line No: 56
2019-03-12T17:06:35.9606756Z ##[debug] Outputing a blank line
2019-03-12T17:06:35.9607241Z ##[debug] Processing Line No: 57
2019-03-12T17:06:35.9607596Z ##[debug] Nothing to expand, just process the line
2019-03-12T17:06:35.9607959Z ##[debug] Processing Line No: 58
2019-03-12T17:06:35.9608300Z ##[debug] Starting block @@Csloop@@

2019-03-12T17:06:35.9608761Z ##[debug] Added 0 items to queue for @@Csloop@@

2019-03-12T17:06:35.9609363Z ##[debug] Processing Line No: 59
2019-03-12T17:06:35.9610114Z ##[debug] No WI or CS so outputing emptySetText
2019-03-12T17:06:35.9610751Z ##[debug] Processing Line No: 60
2019-03-12T17:06:35.9611104Z ##[debug] Ending block @@Csloop@@
2019-03-12T17:06:35.9611463Z Completed processing template
2019-03-12T17:06:35.9611858Z Writing output file D:\a\r1\a/ReleaseNotes.md
2019-03-12T17:06:35.9612339Z Finsihed writing output file D:\a\r1\a/ReleaseNotes.md
2019-03-12T17:06:35.9613060Z ##[debug]task result: Succeeded
2019-03-12T17:06:35.9613889Z ##[debug]Processed: ##vso[task.complete result=Succeeded;]
2019-03-12T17:06:35.9683003Z ##[section]Finishing: Generate Release Notes based on Release Comparision API

@rfennell

This comment has been minimized.

Copy link
Owner

commented Mar 13, 2019

That is strange, as the only difference between the two mode is whether the text comes from a textbox or a read in from a file, after that the processing is the same.

I will give it a try and see what I can spot

@rikhepworth

This comment has been minimized.

Copy link

commented Mar 13, 2019

I believe I'm seeing the same issue with the Fabrikam demo repo that @rfennell and I use. When I paste the template inline it works; when I reference a file in source control it errors. Hopefully this should allow Richard to repro this and dig into what's happening.

@rfennell

This comment has been minimized.

Copy link
Owner

commented Mar 13, 2019

Great saves me having to build a repo of the issue

@rfennell

This comment has been minimized.

Copy link
Owner

commented Mar 13, 2019

I tried the following and it worked in both an inline template and a file based one

## Notes for release  ${releaseDetails.releaseDefinition.name}    
**Release Number**  : ${releaseDetails.name}    
**Release completed** : ${releaseDetails.modifiedOn}     
** Build Number**: $(Build.BuildNumber)
**Compared Release Number**  : ${compareReleaseDetails.name}   

The interesting point is that the build variable is in $() not ${} as is required to pickup a variable the task has built. And I create not ${build.xxx} object to expand.

My guess is the $() is picking up an environment variable, but can't see why only in some circumstances.

I guess the best solution is a change to make sure the the triggering build is available as ${triggeringbuild.xxxx} as an object to expand

@wpschaub

This comment has been minimized.

Copy link
Author

commented Mar 13, 2019

So, are you saying not to use $(), but instead ${releaseDetails.*}? In my environment none of the $()'s are replaced ... however, if you look at the logs above, they appear to be available.

  RELEASE BUILD
Definition Name ${releaseDetails.releaseDefinition.name} Claims.WRC.Web-DV-RN-CLONE
Definition ID ${releaseDetails.releaseDefinition.id} 688
Current Name ${releaseDetails.name} 20190312.2
URL ${releaseDetails._links.web.href} N/A
Completed ${releaseDetails.modifiedOn} N/A
Compared with ${compareReleaseDetails.name} N/A
Source Branch N/A master

... but then reverted to the $()'s again in the generated file.

@wpschaub

This comment has been minimized.

Copy link
Author

commented Mar 13, 2019

@rfennell what's the recommended way to reference the alias variable as part of your ${releaseDetails.*} data? It should be possible to standardize on ${}'s only as a workaround.

"artifacts": [
{
"sourceId": "5117ccec-a450-4292-ad21-4bb035f65f33:688",
"type": "Build",
"alias": "_Claims.WRC.Web-DV-RN-CLONE",
...
}
]

@wpschaub

This comment has been minimized.

Copy link
Author

commented Mar 14, 2019

I have a work around:

RELEASE BUILD
Definition Name ${releaseDetails.releaseDefinition.name} ${releaseDetails.artifacts[0].definitionReference.definition.name}
Definition ID ${releaseDetails.releaseDefinition.id} ${releaseDetails.artifacts[0].definitionReference.definition.id}
Current Name ${releaseDetails.name} ${releaseDetails.artifacts[0].definitionReference.version.name}
URL ${releaseDetails._links.web.href} ${releaseDetails.artifacts[0].definitionReference.artifactSourceVersionUrl.id}
Completed ${releaseDetails.modifiedOn} N/A
Compared with ${compareReleaseDetails.name} N/A
Source Branch N/A ${releaseDetails.artifacts[0].definitionReference.branch.name}

@wpschaub wpschaub closed this Mar 14, 2019

GenerateReleaseNotes (Xplat version) automation moved this from To do to Done Mar 14, 2019

@rfennell

This comment has been minimized.

Copy link
Owner

commented Mar 14, 2019

@wpschaub That is a great solution, I was giving it some thought overnight and think the best I could do was to set ${build.xxx} as an alias for ${releaseDetails.artifacts[0].definitionReference} or something similar, but what artifact to choose.

Your solution puts the control in the template owner

As to $() and ${}

  • ${} is to expand node based expressions as used in this extension
  • $() is to expand Powershell expressions as used in my older PowerShell version of the extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.