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

Version parameter chokes on values with \r in octopus release deploy #121

Open
cdhunt opened this issue Oct 19, 2022 · 2 comments
Open

Version parameter chokes on values with \r in octopus release deploy #121

cdhunt opened this issue Oct 19, 2022 · 2 comments

Comments

@cdhunt
Copy link

cdhunt commented Oct 19, 2022

I hit an annoying edge case bug.

I have a pipeline that builds some software on Windows and as part of that writes the version string to a text file which I consume in a different job that is running in a Linux container.

> "$build" | Set-Content -Path VERSION.txt

What's weird is I consume this to create the release without issue.

$ octopus release deploy --space Default --project project--version $(cat VERSION.txt) --environment Dev --no-prompt

But when I try to deploy the release, it throws an error.

$ octopus release deploy --space Default --project project --version $(cat VERSION.txt) --environment Dev --no-prompt
Octopus API error: Object reference not set to an instance of an object. []

If I trim any newline characters, it works.

$ octopus release deploy --space Default --project project --version $(cat VERSION.txt|tr -d '\n\r') --environment Dev --no-prompt
Successfully started 1 deployment(s)
@benPearce1
Copy link
Contributor

benPearce1 commented Jan 6, 2023

Hi @cdhunt

I haven't been able to recreate your issue.
Would you be able to confirm that you are still having the issue with the latest CLI version?

❯ cat -e version.txt
1.2.4$
$
❯ octopus release create --project 'project 1' --version $(cat version.txt) --no-prompt
Successfully created release version 1.2.4 using channel Default

View this release on Octopus Deploy: https://localhost/app#/Spaces-1/releases/Releases-603
❯ octopus release deploy --project 'project 1' --version $(cat version.txt) --environment dev --no-prompt
Successfully started 1 deployment(s)

View this release on Octopus Deploy: https://localhost/app#/Spaces-1/releases/Releases-603

@cdhunt
Copy link
Author

cdhunt commented Jan 6, 2023

I should have included that the version file is created on a Windows system and the octopus release is executed on a Linux system. I'll try to validate this next week (hopefully).

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