2
votes

I know I can do this: https://docs.travis-ci.com/user/deployment/cloudfoundry

Now in .travis.yml, it will have

deploy:
    edge: true
    provider: cloudfoundry
    username: [email protected]
    password: supersecretpassword
    api: https://api.run.pivotal.io
    organization: myawesomeorganization
    space: staging

Altough password can be encrypted by running

travis encrypt --add deploy.password

I don't want to put username and password(even it's encrypted) in yml file, is there another way for Travis to deploy apps to Cloud Foundry (or IBM Bluemix)?

1

1 Answers

1
votes

There are several ways of passing credentials with Cloud Foundry. Putting them in your .yml file is just one option.

  1. You can set them manually with the command cf set-env, as explained here: https://docs.run.pivotal.io/devguide/deploy-apps/environment-variable.html#view-env
  2. If you are afraid of the CLI, Bluemix also allows you to create user-defined environment variable with its GUI : https://github.com/ibm-cds-labs/simple-data-pipe/wiki/Create-a-user-defined-environment-variable-in-Bluemix#use-the-bluemix-user-interface

I don't want to put username and password(even it's encrypted) in yml file

FYI, the .yml file does not leave your computer/CI server and is just read once by Cloud Foundry.