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

Bitbucket pipelines using Octo.exe docker image does not support project names with spaces #4878

Closed
5 tasks done
hnrkndrssn opened this issue Sep 10, 2018 · 3 comments · Fixed by OctopusDeploy/OctopusClients#377
Assignees
Labels
kind/bug This issue represents a verified problem we are committed to solving

Comments

@hnrkndrssn
Copy link

hnrkndrssn commented Sep 10, 2018

Prerequisites

  • I have verified the problem exists in the latest version
  • I have searched open and closed issues to make sure it isn't already reported
  • I have written a descriptive issue title
  • I have linked the original source of this report
  • I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)

The bug

When using the octopusdeploy/octo (specifically octopusdeploy/octo:4.37.0-alpine) Docker image in Bitbucket Pipelines and you call octo deploy-release --project "Test Website 2018" octo.exe throws the following error Unrecognized command arguments: Website, 2018

NB Running the same Docker image locally (on both Windows and MacOS) does not exhibit the same issue.

What I expected to happen

The call to octo.exe deploy-release to succeed.

Steps to reproduce

Follow the instructions here but instead of running octo pack/push call octo create-release for a project that has spaces in its name.

Screen capture

image

Log exerpt

Affected versions

Octopus Server: N/A

Workarounds

I have been unable to find any combination of escaping that makes the call to octo.exe succeed.

The following permutations have been tested in the bitbucket-pipelines.yml file:

  • octo create-release --project "Project With Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project "Project With Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project 'Project With Spaces' --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project ""Project With Spaces"" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project "Project\ With\ Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project \"Project\ With\ Spaces\" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project ''Project With Spaces'' --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project "Project\ With\ Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project="Project With Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project="""Project With Spaces""" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project "Project With Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project Project With Spaces --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project 'Project With Spaces' --version '$VERSION' --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • octo create-release --project='Project With Spaces' --version='$VERSION' --server=$OCTOPUS_SERVER --apiKey=$OCTOPUS_APIKEY
  • octo create-release --project=\"Project\ With\ Spaces\" --version=$VERSION --server=$OCTOPUS_SERVER --apiKey=$OCTOPUS_APIKEY
  • 'octo create-release --project="Project With Spaces" --version=$VERSION --server=$OCTOPUS_SERVER --apiKey=$OCTOPUS_APIKEY'
  • 'octo create-release --project="Project With Spaces" --version=$VERSION --server=$OCTOPUS_SERVER --apiKey=$OCTOPUS_APIKEY'
  • 'octo create-release --project=''Project With Spaces'' --version=$VERSION --server=$OCTOPUS_SERVER --apiKey=$OCTOPUS_APIKEY'
  • "octo create-release --project="Project With Spaces" --version=$VERSION --server=$OCTOPUS_SERVER --apiKey=$OCTOPUS_APIKEY"
  • "octo create-release --project "Project With Spaces" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY"
  • "octo create-release --project '''Project With Spaces''' --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY"
  • 'octo create-release --project ''Project With Spaces'' --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY'
  • octo create-release --project $OCTOPUS_PROJECT --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY
  • "octo create-release --project "$OCTOPUS_PROJECT" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY"
  • "octo create-release --project '$OCTOPUS_PROJECT' --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY"
  • "octo create-release --project "'$OCTOPUS_PROJECT'" --version $VERSION --server $OCTOPUS_SERVER --apiKey $OCTOPUS_APIKEY"

Environment variable $OCTOPUS_PROJECT tested with the following values:

  • Project With Spaces
  • 'Project With Spaces'
  • "Project With Spaces"
  • \"Project With Spaces\"
  • \'Project With Spaces\'
  • ''Project With Spaces''
  • ""Project With Spaces""

Links

https://help.octopus.com/t/octo-exe-project-name-with-spaces/21242

@hnrkndrssn hnrkndrssn added kind/bug This issue represents a verified problem we are committed to solving area/integration labels Sep 10, 2018
@adam-resdiary
Copy link

For the record, I've just run into this problem as well. I also tried using %20 and replacing the space with a dash (-) since that's what's in the URL in Octopus, but with no joy. For now I think we're going to have to rename our projects if we want to be able to use the docker image.

@hnrkndrssn
Copy link
Author

Fix for this issue has shipped in the octopusdeploy/octo:4.46.2-alpine docker image now available

@lock
Copy link

lock bot commented Apr 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants