Skip to content

lsilvapvt/sample-app-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-space pipeline

Application CI pipeline targeting multiple CF spaces

This is an example of a Concourse pipeline that performs the following tasks for a sample Golang application:

  1. builds (compiles) the binary artifact

  2. unit tests it

  3. deploys it to a Cloud Foundry staging space

  4. load tests it

  5. deploys it to a Cloud Foundry production space

Delivery pipeline

Each step is configured to perform automatically only if the previous step has been successfully executed.

Pre-requisites

The requirements for this pipeline's setup are as follows:

  1. An instance of Concourse is installed either as a local vagrant machine or as a remote server.

    Please refer to the documentation on how to install Concourse.

  2. The Concourse Fly command line interface is installed on the local VM.

    The Fly cli can be downloaded directly from the link provided on the Concourse web interface.

    Please refer to the Fly cli documentation for details.

Pipeline setup and execution

How to setup this sample pipeline on your Concourse server:

  1. Clone this git repository on your local machine
    git clone https://github.com/lsilvapvt/sample-app-pipeline.git
    cd sample-app-pipeline

  2. Setup the pipeline credentials file
    cp ci/credentials.yml.sample ci/credentials.yml

Edit ci/credentials.yml and fill out all the required credentials:
deploy-username: the userID to deploy apps on the Cloud Foundry deployment
deploy-password: the corresponding password to deploy apps on the Cloud Foundry deployment
pws-organization: the name of your organization in Cloud Foundry
pws-staging-space: the name of the staging/development space to deploy the sample app to in CF
pws-production-space: the name of the production space to deploy the sample app to in CF
pws-api: the url of the CF API. (e.g. https://api.run.pivotal.io)

  1. Configure the sample pipeline in Concourse with the following commands:
    fly -t local login

    Example:
    fly -t local login http://192.168.100.4:8080
    fly -t local set-pipeline -c ci/pipeline.yml -p sample-app-pipeline -l ci/credentials.yml

  2. Access to the Concourse web interface (e.g. http://192.168.100.4:8080 ), click on the list of pipelines, un-pause the sample-app-pipeline and then click on its link to visualize its pipeline diagram.

You will then notice the pipeline's jobs getting executed within a few seconds, one at a time, if the previous job in the pipeline is executed successfully.

Notes

Notice that the pipeline is organized in two groups: delivery and deployment, with corresponding links located at the top of the pipeline's diagram.

The delivery group contains the jobs associated with a typical build and test pipeline for development organizations and/or a staging environment. See the pipeline image above.

The deployment group displays the job associated with the typical task of promoting a successful build from development/staging into production.

Deployment pipeline

Edit file ci/pipeline.yml to inspect how this sample Concourse pipeline was defined and structured.

Read more

Credits

This project was forked from the original work of J.Calabrese's sample concourse app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published