Build Information

I am pushing build info from Jenkins to octopus. However, the Branch is not there in the build information. This might be the because I’ve not integrated Bitbucket and Octopus. But I can get the branch name inside the Jenkins pipeline. So, Is it possible to pass the branch name through additionalArgs? i.e.

octopusPushBuildInformation: additionalArgs: ‘branch=master’,…

Hi @endashaw.adane,

Thanks for reaching out. AdditionalArgs(documentation here: https://octopus.com/docs/packaging-applications/build-servers/jenkins/pipeline#build-information) is actually for sending more parameters to the build information command, not the build info file. Here are the parameters for the command that could be added with AdditionalArgs: https://octopus.com/docs/octopus-rest-api/octopus-cli/build-information

I took a look into the code and it looks like Jenkins currently doesnt support branch with the buildinfo file. I will submit this as a feature request, since I think it should probably be added in the future.

However, you could create your own buildinfo file, then do a custom step (not the builtin octopus build info step), and push that file manually with the CLI.

Here is an example of the build info file you would need to create: https://octopus.com/docs/octopus-rest-api/octopus-cli/build-information#basic-example

Please let me know if that works for you and you get it going, or if you need further help.

Thanks,
Jeremy

@jeremy.miller,
Thanks for the response! I’ve managed by creating my own buildinfo file and able to push it to Octopus Deploy. However, I’ve the following questions:

  1. To get the work item, I think I’ve to integrate jira with Octopus Deploy. Right?
  2. When we deploy release to production at the end of the sprint, how do we have consolidated release notes? Do we need to edit the release note?

@jeremy.miller,
Is it possible also to include commentparser in the json file?

Hi @endashaw.adane,

You’re very welcome!

You’re correct, for work items you will have to integrate with Jira, here is some documentation on that: https://octopus.com/docs/releases/issue-tracking/jira

For your sprint question, I think I need some more detail. How are you guys doing your deployments/releases/notes? Could I have some examples as well as an example of how you want them consolidated?

What do you mean include commentparser? I’m not sure I understand the question on this one, sorry.

Please let me know.

Thanks,
Jeremy

Hi @jeremy.miller,
we have a 4 weeks sprint, developers work on jira and will continuously deployed to DEV and QA. However, the final release will be deployed to PROD at the end of the sprint. i.e. PROD deployed once in every month. So, when deployed to PROD, we want to see release notes that contains all changes that makes to PROD.

Forget about commentParser. Octo.exe does not accept it just like the OctopusDeploy plugin to set it either to GitHub or Jira.

Hi @endashaw.adane,

I think this documentation will help explain what you’re looking to show with your prod release. https://octopus.com/docs/releases/deployment-notes

Please let me know if that will work for you or if we need to dig in a bit further.

Thanks,
Jeremy

@jeremy.miller,
Thanks! I’ll look into that. In the mean time, as I said before I was able to manage the build information and push it to Octopus. The build information is shown properly but release notes does not show the package, commits…

I am using the following template
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
#{each commit in package.Commits}
- #{commit.CommitId} - #{commit.Comment}
#{/each}
#{/each}

Hi,

Could you please send screenshots of your package as well as the corresponding build information datapoint?

Is this screenshot you sent an example screenshot from documentation?

Thanks,
Jeremy

@jeremy.miller,

Oh I am using external feeds to store packages. If I go to Packages under library, nothing is there. The screenshot I shared is from Octopus.

Hi,
Would you be able to screenshot it in the external feed with the version and id as well as the build information section for that specific package and version of the app? If you need it to be private you can private message the screenshot to me.

Thanks,
Jeremy

@jeremy.miller,
Thanks! I’ve sent you the screenshots

Hi,

I took a look at your screenshots, as well as the one above. It looks like in the screenshot above everything is working, but you sent me screenshots of a different package and build information.

Should the second package also be included in that release or is it another project/release?

Thanks,
Jeremy

Hi,

It is another build. here is the detail info. sorry about that


Regards,

Hi,

I apologize if I’m missing something, but it does look like your package and commits as well as the release notes are showing up. What is missing that you are expecting to be there?

Thanks,
Jeremy

Hi ,

may be I misunderstood release notes. I was expecting release notes as below. even though worktime is not shown, I was expecting the package to be shown. look at the release notes section of below screen and compare it with mine which I sent you before this.

image.png

Hi,

Yes, based on the code you pasted above you should see the package ID and version. You have that pasted in the Release Notes Template in the Project Settings and have created a new release since then?

Please let me know.

Thanks,
Jeremy

Hi @jeremy.miller

Thanks again for your time! I’ve create a new release. (remove the old and create new). The release notes shows the following

based on the below template, the issue is the commit is not properly rendered.
#{each package in Octopus.Release.Package}
This release contains #{package.PackageId} #{package.Version}
#{each commit in package.Commits}
- #{commit.CommitId} - #{commit.Comment}
#{/each}
#{/each}

@jeremy.miller
the above screen shot is when I create the release directly from Octoups. However, if I create the release from jenkins using OctopsDeploy plugin, the release note is always like below. id does not show the package
release note from jenkins

Hi,

Would you be able to email me a copy of the buildinfo file you’re creating, as well as screenshots of your jenkins pipeline or a job xml export(octopus and buildinfo related sections)?

Thanks,
Jeremy