cloudfoundry-community / cf-resource

Concourse resource for interacting with Cloud Foundry
Apache License 2.0
35 stars 63 forks source link

Cloud Foundry Resource

An output only resource (at the moment) that will deploy an application to a Cloud Foundry deployment.

Source Configuration

Note: you must provide either username and password or client_id and client_secret.

Behaviour

out: Deploy an application to a Cloud Foundry

Pushes an application to the Cloud Foundry detailed in the source configuration. A manifest that describes the application must be specified.

Parameters

Pipeline example

---
jobs:
- name: job-deploy-app
  public: true
  serial: true
  plan:
  - get: resource-web-app
  - task: build
    file: resource-web-app/build.yml
  - put: resource-deploy-web-app
    params:
      manifest: build-output/manifest.yml
      environment_variables:
        key: value
        key2: value2

resources:
- name: resource-web-app
  type: git
  source:
    uri: https://github.com/cloudfoundry-community/simple-go-web-app.git

- name: resource-deploy-web-app
  type: cf
  source:
    api: https://api.run.pivotal.io
    username: EMAIL
    password: PASSWORD
    organization: ORG
    space: SPACE
    skip_cert_check: false

Development

Prerequisites

Running the tests

The tests have been embedded with the Dockerfile; ensuring that the testing environment is consistent across any docker enabled platform. When the docker image builds, the test are run inside the docker container, on failure they will stop the build.

Run the tests with the following commands for both alpine and ubuntu images:

docker build -t cf-resource -f dockerfiles/alpine/Dockerfile .
docker build -t cf-resource -f dockerfiles/ubuntu/Dockerfile .

Contributing

Please make all pull requests to the master branch and ensure tests pass locally.