balteo
balteo

Reputation: 24699

Deploying manually a CircleCI build to Cloud Foundry

I am new to CircleCI and would like to know how to deploy manually a CircleCI build to Pivotal Cloud Foundry.

Say my CircleCI build passes (tests, ect.) and is therefore "known to be good" and I want to deploy that to Cloud Foundry.

Is there a way to deploy that CircleCI build manually instead of continuously?

Upvotes: 1

Views: 359

Answers (2)

Marcin Soja
Marcin Soja

Reputation: 11

I'm giving you an example of circle.yml

machine:
  java:
    version: oraclejdk8
dependencies:
  pre:
    - curl -v -L -o cf-cli_amd64.deb 'https://cli.run.pivotal.io/stable?release=debian64&source=github'
    - sudo dpkg -i cf-cli_amd64.deb
    - cf -v
deployment:
  staging:
    branch: master
    commands:
      - cf api https://api.run.pivotal.io
      - cf auth $CF_USER $CF_PASSWORD
      - cf target -o [org] -s [space]
      - cf push [app-name]

Upvotes: 1

Fabian Kleiser
Fabian Kleiser

Reputation: 3018

You may define build artifacts in CircleCI, which you can just download after the build passes and cf push them from your machine.

Anyways, I would rather suggest to continuously deploy from a certain branch, e.g. staging or production. You may then trigger the builds by merging into that branch. To get started, have a look at the CircleCI documentation for Bluemix/PWS.

Upvotes: 2

Related Questions