What is the status on this post? How does one generate the build information when using the Jenkins pipeline? Is our only option to manually generate the json?
I can see, that if I’m not using pipelines, Octopus plugin generates the file. But how do we do that in a pipeline?
I have not done the custom install script, I installed the Octopus CLI on the server manually for now.
I’ve configured the tools, and it works if I’m using a free style project with the build-information step.
When I run it from a pipeline, using the octo.exe build-information, it can’t locate the buildinfo.json (because it doesn’t exist).
When I run from pipeline using plugin, I get
[Pipeline] octopusPushBuildInformation (hide) FATAL: Failed to push the build information: null
When I run from from Jenkins Script console:
println (octopusPushBuildInformation additionalArgs: ‘’, commentParser: ‘Jira’, overwriteMode: ‘OverwriteExisting’, packageId: ‘my.packagename’, packageVersion: ‘my.package.version’, serverId: ‘my.octopus.server’, spaceId: ‘Spaces-1’, toolId: ‘Default’, verboseLogging: true, giturl: ‘my.git.url’, gitcommit: ‘my.gitcommit’)
I was finally able to find my problem, I used the syntax generator in Jenkins, and it defaults to generating values with single quotes. When I substituted those values with variables ‘${myvariable}’, the process fails with no really output, thus the null above.
Changing to double quotes around my variable values resolved the problem for me. “${myvariable}”