Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected differences between json and basic cli output (--output-format json not working) #281

Open
mieliespoor opened this issue Oct 4, 2023 · 1 comment

Comments

@mieliespoor
Copy link

mieliespoor commented Oct 4, 2023

The bug

When creating a release and supplying the flag --output-format json, the response is vastly different to when omitting that flag (thus returning basic string format).

Command to reproduce

Basic formatting

octopus release create  --project "project.name" --version 1.4.4 --package-version 1.4.4 --channel Release --release-notes "auto created from build pipeline." --space "Default" --no-prompt

Successfully created release version 1.4.4.1 using channel Release

View this release on Octopus Deploy: https://octopus.domain.com/app#/Spaces-1/releases/Releases-297773

octopus release create  --project "project.name" --version 1.4.4 --package-version 1.4.4 --channel Release --release-notes "auto created from build pipeline." --space "Default" --no-prompt --output-format json
{"ReleaseNotes":"","Assembled":"0001-01-01T00:00:00Z","Channel":"Release","Version":"1.4.4.1"}

Outcome

The expectation is that in the json output, I would at the very least get back the release id, in this case Releases-297773. Without that we need to now do a second call to try and get the release id, or we need to do string manipulation on the basic output to get the release id / link.

Versions

cli: I don't know as the cli doesn't have a way to tell me what version it is!

Octopus Server: 2023.2

Links

@donnybell donnybell changed the title Unexpected differences between json and basic cli output Unexpected differences between json and basic cli output (--output-format json not working) Oct 4, 2023
@donnybell
Copy link

I confirmed this in CLI Go 1.6.2:
image

Here is what this looks like in the CLI 9.1.7:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants