Skip to content

Instantly share code, notes, and snippets.

@hacktivist123
Last active March 19, 2021 09:55
Show Gist options
  • Select an option

  • Save hacktivist123/a233fb127417ddef392c13e406645a43 to your computer and use it in GitHub Desktop.

Select an option

Save hacktivist123/a233fb127417ddef392c13e406645a43 to your computer and use it in GitHub Desktop.
Cloud Foundry CircleCI
version: '2.1'
jobs:
install-login-deploy:
docker:
- image: cimg/base:stable
steps:
- checkout
- run:
name: Install Cloud Foundry CLI
command: |
sudo apt-get update
sudo apt-get install -y ca-certificates jq
sudo touch /etc/apt/sources.list.d/cloudfoundry-cli.list
echo "deb [trusted=yes] https://packages.cloudfoundry.org/debian stable main" | sudo tee -a /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo apt-get update
sudo apt-get install dpkg
sudo apt-get install cf7-cli
- run:
name: Set up Cloud Foundry CLI
command: |
cf -v
cf api --skip-ssl-validation "$CF_API"
cf auth "$CF_USER" "$CF_PASSWORD"
cf target -o "$CF_ORG"
cf set-env exchange-value API_KEY $API_KEY
cf set-env exchange-value CONVERTER_API_KEY $CONVERTER_API_KEY
cf set-env exchange-value SYMBOLS $SYMBOLS
- run:
name: Push application to Cloud Foundry
command: cf push exchange-value
workflows:
version: 2
cloudfoundry-deploy:
jobs:
- install-login-deploy
@zmarkan
Copy link
Copy Markdown

zmarkan commented Mar 19, 2021

I think you should split these into 3 distinct run calls (you can do multiline commands w/ | character) - see my fork: https://gist.github.com/zmarkan/1437acc5dc83672b36b75a6fe044ddbc

@hacktivist123
Copy link
Copy Markdown
Author

hacktivist123 commented Mar 19, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment