Error sending build information from jenkins to octopus

I setup my Jenkins build per the documentation to send build information to Octopus but I’m getting the following error. I don’t see any mention of this file in the documentation. I’m running v2019.6.3 on my server.

Build information file ‘octopus.buildinfo’ does not exist

There is nowhere in Jenkins to define the --file parameter and it’s being auto-generated.

Here is the debug output of me running the same command from the build:

C:\tools\Octopus\Octopus_CLI_Global_Tool>dotnet-octo.exe build-information --server http://bas0355:8082 --apiKey API-xxxxxxxxxx --space Spaces-1 --package-id HomeDecor.ECommerce --version 1.0.0 --file octopus.buildinfo --overwrite-mode OverwriteExisting --debug --logLevel=verbose

Octopus Deploy Command Line Tool, version 7.4.0

Detected automation environment: "NoneOrUnknown"
DispatchRequest: GET http://bas0355:8082/api
DispatchRequest: GET http://bas0355:8082/api
DispatchRequest: GET http://bas0355:8082/api
DispatchRequest: GET http://bas0355:8082/api/spaces/Spaces-1
DispatchRequest: GET http://bas0355:8082/api/spaces?name=Spaces-1
Found space: Default (Spaces-1)
Space name specified, process is now running in the context of space: Default
Handshaking with Octopus Server: http://bas0355:8082
GET http://bas0355:8082/api
DispatchRequest: GET http://bas0355:8082/api
Handshake successful. Octopus version: 2019.6.3; API version: 3.0.0
GET http://bas0355:8082/api/Spaces-1
DispatchRequest: GET http://bas0355:8082/api/Spaces-1
GET http://bas0355:8082/api/users/me
DispatchRequest: GET http://bas0355:8082/api/users/me
Authenticated as: xxxxxxxxxxxxxxx
Build information file 'octopus.buildinfo' does not exist
Exit code: -1

Hi Joey,

Thanks for reaching out.

The buildinfo file is actually created automatically as part of that Jenkins push build info step.

If you turn on verbose logging for that step and take a look in the build output, you should see the json it creates. Can you turn on verbose logging and paste that section of the output for me? Which version of the jenkins Octopus plugin are you running?

Thanks,
Jeremy

Hi Jeremy, this is the verbose output. It spits out Detected Octopus server version doesn't support the Build Information API. but yet succeeds. (exit code 0)

I guess this means we need to upgrade our server to latest?

INFO: Creating octopus.buildinfo in C:\Program Files (x86)\Jenkins\workspace\HD Ecommerce
INFO: Serializing Octopus build information
INFO: Serialized Octopus build information - {
  "BuildEnvironment": "Jenkins",
  "CommentParser": "Jira",
  "BuildNumber": "908",
  "BuildUrl": "http://bas0355:8080/job/HD%20Ecommerce/908/",
  "VcsType": "Git",
  "VcsRoot": "https://bitbucket.org/buildasign/home-decor.git",
  "VcsCommitNumber": "144cbf34b59e67d92c20d612ece5e097cba95e8a",
  "Commits": [
    {
      "Id": "257e182fdfdf69e9b903dd2f3f3c3bdaa0f59a69",
      "Comment": "INT-1384: Added StripeChargeId column to Payments table"
    },
    {
      "Id": "40bd1f113840b0fdb1a60fbb1b5045f8ad74b28d",
      "Comment": "HD-1479: Updated the templates page tile images to 'contain' the background so that the images are fully show regardless of aspect ratio"
    }
  ]
}
INFO: Wrote octopus.buildinfo
[HD Ecommerce] $ C:\tools\Octopus\Octopus_CLI_Global_Tool\dotnet-octo.exe build-information --server http://bas0355:8082 --apiKey ******** --space Spaces-1 --package-id HomeDecor.ECommerce --version 1.0.0 --file octopus.buildinfo --overwrite-mode OverwriteExisting --debug
Octopus Deploy Command Line Tool, version 7.4.0

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://bas0355:8082
GET http://bas0355:8082/api
Handshake successful. Octopus version: 2019.6.3; API version: 3.0.0
GET http://bas0355:8082/api/Spaces-1
GET http://bas0355:8082/api/users/me
Authenticated as: xxxxxxxxx
Detected Octopus server version doesn't support the Build Information API.
Pushing build information as legacy package metadata for package "HomeDecor.ECommerce" version "1.0.0"...
POST http://bas0355:8082/api/Spaces-1/package-metadata?replace=True
Push successful
INFO: Octopus CLI exit code: 0

Just saw the docs indicate that version 2019.10.0 or higher support package meta data. So we’ll have to upgrade.

Hey Joey,

Yeah, that’s correct. We changed the build information stuff back in 2019. If you do upgrade, we highly suggest going as current as possible. It’s worth mentioning anything 2020.X requires either SQL 2017 or SQL 2016 (depending on the version you choose.)

Please let me know if you have any issues after upgrading.

I hope you have a great weekend.

Thanks,
Jeremy