TeamCity not generating metadata for Octopus

I am trying out the new Octopus Metadata build plugin for TeamCity with JIRA (Server, not Cloud), and it seems to be executing okay, but as far as I can tell, it is not sending through metadata to Octopus - how can I verify that it is working correctly, or what should I be seeing in TeamCity/Octopus when it is working correctly?

I run the metadata step after creating an Octopus release - is that correct?

The metadata build step when executed produces an output like this:

[11:15:40]Creating D:\TeamCity\work\b6ca515f6352cce3\octopus.metadata
[11:15:40]Serializing Octopus metadata
[11:15:40]Serialized Octopus metadata - {
  "BuildEnvironment": "TeamCity",
  "CommentParser": "Jira",
  "BuildNumber": "12.7.0-rc.192",
  "BuildUrl": ""
[11:15:40]Wrote D:\TeamCity\work\b6ca515f6352cce3\octopus.metadata
[11:15:40]Octopus Deploy (10s)
[11:15:40]Running command:   octo.exe push-metadata --server --apikey SECRET --package-id MyOrg.Website --version 12.7.0-rc0192 --metadata-file D:\TeamCity\work\b6ca515f6352cce3\octopus.metadata
[11:15:40]Pushing package metadata to Octopus server
[11:15:44]Octopus Deploy Command Line Tool, version 6.3.3
[11:15:45]Detected automation environment: "TeamCity/2018.2.4"
[11:15:49]Space name unspecified, process will run in the default space context
[11:15:49]Handshaking with Octopus Server:
[11:15:50]Handshake successful. Octopus version: 2019.5.3; API version: 3.0.0
[11:15:50]Authenticated as: TeamCityUser <> 
[11:15:50]Pushing package metadata: "MyOrg.Website"...
[11:15:51]Push successful
[11:15:51]Octo.exe exit code: 0

Should I see JIRA tickets being mentioned in there? TeamCity is correctly identifying the JIRA issues which are linked to the code commits being built, I just don’t seem them here in the metadata, nor do I see any metadata appearing at the Octopus end.

This seems to be similar to MetaData build step not available in TeamCity, which did not get a resolving response.

Hi David,

Thanks for getting in touch.

I run the metadata step after creating an Octopus release - is that correct?

You’d need to run the metadata before creating your Octopus release, otherwise your work items won’t be included in the release.

What version of the Octopus Deploy plugin are you currently running (latest version is 5.1.6 that can be found here)? The data that’s generated seems to be missing a number of fields, including the commit details.

Also, if there are no changes in your TeamCity build (i.e. you re-run an already run build in TeamCity), there won’t be any commits included in the metadata. This is something we’re currently trying to figure out a solution for.

Thank you and best regards,

Hi Henrik,

Thanks for your reply. I am running the 5.1.6 version of the plugin; connecting to BitBucket Cloud for source control and JIRA on-premise for tickets. The TeamCity JIRA plugin is able to link JIRA issues to code commits, so I’m not sure why the details are missing from the Octopus metadata.

The OctopusDeploy:Metadata and OctopusDeploy: Create Release build steps are defined in a build configuration that is separate from the build configuration that does that actual compiling of the application and the creating of the Octopus deployment package - it takes a snapshot dependency instead and retrieves the deployment package that way. Maybe the metadata step requires the information from the dependency but cannot walk the connection - I will try moving the metadata step to the build configuration where the actual compilation takes places, and see what happens.

Hi David,

OK, snapshot dependencies won’t have the necessary details that we need to build up the package metadata so this is why it’s missing for you.

The metadata step has to be on the build that is triggered by the commit, we’ll update our docs to state this fact.


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