Release Note not working from Jira issue tracking

Octopos version : Octopus.2019.12.4

I try to generate automatic release note in octopus by Jira issue tracking but not working.
there is my result :


there is out put jenkins configuration :
Time Elapsed 00:00:27.44
INFO: Creating octopus.buildinfo in D:\app\Jenkins\workspace\Training.DailyBuild
INFO: Serializing Octopus build information
INFO: Serialized Octopus build information - {
“BuildEnvironment”: “Jenkins”,
“CommentParser”: “Jira”,
“BuildNumber”: “156”,
“BuildUrl”: “https://jenkins-homo.oddo.fr/job/Training.DailyBuild/156/”,
“VcsType”: “Unknown”,
“VcsRoot”: “${GIT_URL}”,
“VcsCommitNumber”: “${GIT_COMMIT}”,
“Commits”: [
{
“Id”: “2243”,
“Comment”: “PROJ-4 : remove value from line code”
}
]
}
INFO: Wrote octopus.buildinfo
[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe build-information --server http://zapplwego0001/ --apiKey ******** --space Spaces-1 --package-id Oddo.Training-1.1.155.2243 --version 1.1.155.2243 --file octopus.buildinfo --overwrite-mode OverwriteExisting --debug --overwrite-mode=OverwriteExisting
Octopus Deploy Command Line Tool, version 7.3.7

Detected automation environment: “Jenkins”
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://zapplwego0001/
GET http://zapplwego0001/api
Handshake successful. Octopus version: 2019.13.7; API version: 3.0.0
GET http://zapplwego0001/api/Spaces-1
GET http://zapplwego0001/api/users/me
Authenticated as: app_jenkins_conad_1 yassine.kerkeni@oddo-bhf.com
Pushing build information for package “Oddo.Training-1.1.155.2243” version “1.1.155.2243”…
POST http://zapplwego0001/api/Spaces-1/build-information?overwriteMode=OverwriteExisting
Push successful
INFO: Octo.exe exit code: 0
INFO: Started Octopus Release
INFO: =======================
INFO: Project: Training
INFO: Release Version: 1.1.155.2243
INFO: Channel: Default
INFO: Include Release Notes?: true
INFO: Release Notes Source: file
INFO: Release Notes File: D:\App\Test\Test.txt
INFO: Deploy this Release?: false
INFO: Package Configurations:
INFO: Oddo.Training Oddo.Training v1.1.155.2243
INFO: =======================
[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe create-release --version 1.1.155.2243 --channel Default --releaseNotes “Hello change :

#{Octopus.Deployment.Changes[0].Version | MarkdownToHtml}

” --package Oddo.Training:Oddo.Training:1.1.155.2243 --project Training --server http://zapplwego0001/ --apiKey ******** --space Spaces-1
Octopus Deploy Command Line Tool, version 7.3.7

Detected automation environment: “Jenkins”
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://zapplwego0001/
Handshake successful. Octopus version: 2019.13.7; API version: 3.0.0
Authenticated as: app_jenkins_conad_1 yassine.kerkeni@oddo-bhf.com
Found environments:
This Octopus Server supports channels
Found project: Training (Projects-1)
Building release plan for channel ‘Default’…
Found channel: Default (Channels-1)
Finding deployment process…
Finding release template…
The package version for some steps was not specified. Going to try and resolve those automatically…
Finding latest package for step: DeployWS
Selected ‘Oddo.Training’ version ‘1.1.156.2243’ for ‘DeployWS’
Using version number provided on command-line: 1.1.155.2243
Release plan for Training 1.1.155.2243
Channel: ‘Default’ (this is the default channel)

Name Version Source Version rules


1 DeployWS 1.1.156.2243 Latest available Allow any version

Creating release…
Release 1.1.155.2243 created successfully!
INFO: Octo.exe exit code: 0
INFO: Release created:
http://zapplwego0001/app#/Spaces-1/releases/Releases-246
INFO: Started Octopus Deploy
INFO: ======================
INFO: Project: Training
INFO: Version: 1.1.155.2243
INFO: Environment: Developpement
INFO: ======================
[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe deploy-release --deployTo Developpement --version 1.1.155.2243 --project Training --server http://zapplwego0001/ --apiKey ******** --space Spaces-1
Octopus Deploy Command Line Tool, version 7.3.7

Detected automation environment: “Jenkins”
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://zapplwego0001/
Handshake successful. Octopus version: 2019.13.7; API version: 3.0.0
Authenticated as: app_jenkins_conad_1 yassine.kerkeni@oddo-bhf.com
Found environment: Developpement (Environments-1)
Found project: Training (Projects-1)
Finding release 1.1.155.2243
Found environment: Developpement (Environments-1)
Deploying Training “1.1.155.2243” to: Developpement (Guided Failure: Not Enabled)
INFO: Octo.exe exit code: 0
INFO: Deployment executed:
http://zapplwego0001/app#/Spaces-1/deployments/Deployments-283
Finished: SUCCESS

there is build information :


there is ServerTasks-1308.log.txt (91.5 KB)

there is my log octopus in attachment file :
there is a part of log
[Octopus.Deployment.Changes] = ‘[{“Version”:“1.1.155.2243”,“ReleaseNotes”:“Hello change :

#{Octopus.Deployment.Changes[0].Version | MarkdownToHtml}

”,“BuildInformation”:[],“WorkItems”:[],“Commits”:[]}]’

this blocks not visible in my log :


on : Octopus.2019.12.4

the correct bihavior i waiting result like this but with correct values but not working :
image

I think the problem the [Octopus.Deployment.Changes] missing some fields like BuildInformation, WorkItems and Commits but I d’ont know why ?

[Octopus.Deployment.Changes] = ‘[{“Version”:“1.1.155.2243”,“ReleaseNotes”:“Hello change :

#{Octopus.Deployment.Changes[0].Version | MarkdownToHtml}

”,“BuildInformation”:[],“WorkItems”:[],“Commits”:[]}]’

Thanks

Hi @yassine.kerkeni,

Thanks for reaching out.

Unfortunately, the Octopus.Deployment.Changes system variable can’t be referenced outside of the steps of a deployment. Can you please try using Octopus.Release.Package and see if that gets you where you need to be?

Thanks,
Jeremy

Hello @jeremy.miller ,
Thank you for your response quickly :slight_smile:
but I tried [Octopus.Release.Package] it’s not working in my log id’nt have any values with [Octopus.Release.Package]

this blocks not visible in my log :

I think the problem the [Octopus.Deployment.Changes] missing some fields like BuildInformation, WorkItems and Commits but I d’ont know why ?

[Octopus.Deployment.Changes] = ‘[{“Version”:“1.1.155.2243”,“ReleaseNotes”:“Hello change :

#{Octopus.Deployment.Changes[0].Version | MarkdownToHtml}

”,“BuildInformation”:[],“WorkItems”:[],“Commits”:[]}]’

Thanks

Hello @jeremy.miller

There is code of release note :
Hello change :
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
#{/each}

PackageId : #{Octopus.Release.Package[0].PackageId | MarkdownToHtml}

Version : #{Octopus.Release.Package[0].Version | MarkdownToHtml}

There is a result :
image

Hi @yassine.kerkeni,

I think the problem we’re running into here is that the Build Information has an extra version number on the end. My apologies, I didn’t notice that the first time. For the link between build info and the package to occur, the packageId must be identical in both places.

For example:

In your Jenkins output:

[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe build-information --server http://zapplwego0001/ --apiKey ******** --space Spaces-1 --package-id Oddo.Training-1.1.155.2243 --version 1.1.155.2243 --file octopus.buildinfo --overwrite-mode OverwriteExisting --debug --overwrite-mode=OverwriteExisting

I believe --package-id should just be Oddo.Training. Once the PackageId of the package and the buildinfo are identical, the link should exist to populate the build info inside of the release.

I do want to mention that referencing Octopus.Release.Package as an array in your example won’t work. The each loop will work once we fix the above.

Can you please give that a try and let me know if it resolves the issue for you?

Thanks,
Jeremy

Hello,
Thanks for your response
I tried fix the problem i have this result :


for this release tfile :
Hello change :
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
#{each commit in package.Commits}
- #{commit.CommitId} - #{commit.Comment}
#{/each}
#{/each}
but Ihave any package :

out put jenkins :
INFO: Creating octopus.buildinfo in D:\app\Jenkins\workspace\Training.DailyBuild
INFO: Serializing Octopus build information
INFO: Serialized Octopus build information - {
“BuildEnvironment”: “Jenkins”,
“CommentParser”: “Jira”,
“BuildNumber”: “161”,
“BuildUrl”: “https://jenkins-homo.oddo.fr/job/Training.DailyBuild/161/”,
“VcsType”: “Unknown”,
“VcsRoot”: “${GIT_URL}”,
“VcsCommitNumber”: “${GIT_COMMIT}”,
“Commits”: [
{
“Id”: “2247”,
“Comment”: “PROJ-4 : add hello world”
},
{
“Id”: “2248”,
“Comment”: “PROJ-4 : remove hello world values”
}
]
}
INFO: Wrote octopus.buildinfo
[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe build-information --server http://zapplwego0001/ --apiKey ******** --space Spaces-1 --package-id Oddo.Training --version 1.1.161.2248 --file octopus.buildinfo --overwrite-mode OverwriteExisting --debug --overwrite-mode=OverwriteExisting
Octopus Deploy Command Line Tool, version 7.3.7

Detected automation environment: “Jenkins”
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://zapplwego0001/
GET http://zapplwego0001/api
Handshake successful. Octopus version: 2019.13.7; API version: 3.0.0
GET http://zapplwego0001/api/Spaces-1
GET http://zapplwego0001/api/users/me
Authenticated as: app_jenkins_conad_1 yassine.kerkeni@oddo-bhf.com
Pushing build information for package “Oddo.Training” version “1.1.161.2248”…
POST http://zapplwego0001/api/Spaces-1/build-information?overwriteMode=OverwriteExisting
Push successful
INFO: Octo.exe exit code: 0
INFO: Started Octopus Release
INFO: =======================
INFO: Project: Training
INFO: Release Version: 1.1.161.2248
INFO: Channel: Default
INFO: Include Release Notes?: true
INFO: Release Notes Source: file
INFO: Release Notes File: D:\App\Test\Test.txt
INFO: Deploy this Release?: false
INFO: Package Configurations:
INFO: DeployWS v1.1.161.2248
INFO: =======================
[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe create-release --version 1.1.161.2248 --channel Default --releaseNotes “Hello change :
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
    #{each commit in package.Commits}
- #{commit.CommitId} - #{commit.Comment}
#{/each}
#{/each}” --package DeployWS:1.1.161.2248 --project Training --server http://zapplwego0001/ --apiKey ******** --space Spaces-1
Octopus Deploy Command Line Tool, version 7.3.7

Detected automation environment: “Jenkins”
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://zapplwego0001/
Handshake successful. Octopus version: 2019.13.7; API version: 3.0.0
Authenticated as: app_jenkins_conad_1 yassine.kerkeni@oddo-bhf.com
Found environments:
This Octopus Server supports channels
Found project: Training (Projects-1)
Building release plan for channel ‘Default’…
Found channel: Default (Channels-1)
Finding deployment process…
Finding release template…
Using version number provided on command-line: 1.1.161.2248
Release plan for Training 1.1.161.2248
Channel: ‘Default’ (this is the default channel)

Name Version Source Version rules


1 DeployWS 1.1.161.2248 User specified Allow any version

Creating release…
Release 1.1.161.2248 created successfully!
INFO: Octo.exe exit code: 0
INFO: Release created:
http://zapplwego0001/app#/Spaces-1/releases/Releases-249
INFO: Started Octopus Deploy
INFO: ======================
INFO: Project: Training
INFO: Version: 1.1.161.2248
INFO: Environment: Developpement
INFO: ======================
[Training.DailyBuild] $ D:\App\Tools\Octo\Octo.exe deploy-release --deployTo Developpement --version 1.1.161.2248 --project Training --server http://zapplwego0001/ --apiKey ******** --space Spaces-1
Octopus Deploy Command Line Tool, version 7.3.7

Detected automation environment: “Jenkins”
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://zapplwego0001/
Handshake successful. Octopus version: 2019.13.7; API version: 3.0.0
Authenticated as: app_jenkins_conad_1 yassine.kerkeni@oddo-bhf.com
Found environment: Developpement (Environments-1)
Found project: Training (Projects-1)
Finding release 1.1.161.2248
Found environment: Developpement (Environments-1)
Deploying Training “1.1.161.2248” to: Developpement (Guided Failure: Not Enabled)
INFO: Octo.exe exit code: 0
INFO: Deployment executed:
http://zapplwego0001/app#/Spaces-1/deployments/Deployments-286
Finished: SUCCESS
*log :
ServerTasks-1355.log.txt (93.9 KB)

Thanks

Hello @jeremy.miller,
All information jira is imported except commits is empty now. Do you know why ?
There are my last result test :




My release note :
Hello change :
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
WorkItems :
#{each issue in package.WorkItems}
- #{issue.Id}
#{/each}
Commits :
#{each commit in package.Commits}
- #{commit.CommitId} - #{commit.Comment}
#{/each}
#{/each}
this info existing in octopus.buildinfo generated by jenkins :
INFO: Serialized Octopus build information - {
“BuildEnvironment”: “Jenkins”,
“CommentParser”: “Jira”,
“BuildNumber”: “164”,
“BuildUrl”: “https://jenkins-homo.oddo.fr/job/Training.DailyBuild/164/”,
“VcsType”: “Unknown”,
“VcsRoot”: “${GIT_URL}”,
“VcsCommitNumber”: “${GIT_COMMIT}”,
“Commits”: [
{
“Id”: “2250”,
“Comment”: “PROJ-4 : test update message info”
}
]
}
INFO: Wrote octopus.buildinfo

Thanks

Hi @yassine.kerkeni,

Can you please share your Jenkins build configuration with me as well as an attachment of the full verbose log? In your jenkins log it looks like there is an issue. For reference compare your build info jenkins output to this:

  "VcsType": "Git",
  "VcsRoot": "https://github.com/OctopusSamples/RandomQuotes-Java.git",
  "VcsCommitNumber": "1230d29a6610210c0505510615f6eb71a2c51e6b",

If there is sensitive data please feel free to direct message the information to me.

Thanks,
Jeremy

Hello @jeremy.miller
I sended message for you
Thanks

Hi All,

I wanted to update the thread in case anyone else has this issue and comes across this. The commit comments were not making it to octopus as SVN is currently not supported for that feature. If you would like to see this feature implemented, please vote for it over on uservoice.

Thank you,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.