Skip to content

bluemixcloudfoundry provider freezes build on cf login step #1190

Closed
@jpwsutton

Description

Hi, I'm using the bluemixcloudfoundry provider in my automated deployment and have found an issue that I think should be a fairly straightforward fix:

When the provider issues the cf login command, in my case it interactively requests which organization we are logging into and so the build freezes.

Log:

Authenticate deployment
$ ./cf api api.eu-gb.bluemix.net
Setting api endpoint to api.eu-gb.bluemix.net...
OK
api endpoint:   https://api.eu-gb.bluemix.net
api version:    2.147.0
Not logged in. Use 'cf login' or 'cf login --sso' to log in.
$ ./cf login -u apikey -p ********************
API endpoint: https://api.eu-gb.bluemix.net
Authenticating...
OK
Select an org:
1. One of My Orgs
2. Another Organization
3. Personal Projects

I believe that the login command should also use the -o argument to select the Organization so that it doesn't prompt for it. It might be worth adding the -s space argument in as well.

I think the fix should be here: https://github.com/travis-ci/dpl/blob/master/lib/dpl/providers/bluemixcloudfoundry.rb#L37

Change the line to:

login:   './cf login -u %{username} -p %{password} -o %{organization} -s %{space}',

I'm happy to submit a PR, but thought it best to run it past the travis team in an issue first.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions