GSA/cg-pipelines

Name: cg-pipelines

Owner: U.S. General Services Administration

Description: Concourse pipelines for the 18F Cloud Foundry deployment.

Created: 2016-01-26 14:48:09.0

Updated: 2016-01-26 14:48:10.0

Pushed: 2016-01-15 01:00:39.0

Homepage: https://ci.cloud.gov

Size: 62

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

18F Cloud Foundry Concourse pipelines

This repo contains various Concourse pipelines that help manage the 18F Cloud Foundry infrastructure.

Structure of this repository:

Each pipeline in this repository should be contained within a folder that contains all of the files related to that pipeline. In order to keep the infrastructure secure all of the credentials and other sensitive information contained in the pipeline should be split out of the pipeline YAML file and into a credentials YAML file. You can also create run scripts that automate the execution or addition of the pipeline through the Concourse fly CLI.

The structure of this repository will look like:
Working with Concourse pipelines:

You can learn a lot about working with pipelines by consulting the Concourse documentation or by taking a look at this tutorial repository but this section will cover some of the basics for assembling the pipelines from the required files.

How to use private variables:

A private variable may be specified anywhere in the pipeline.yml file. The syntax is simple. Any name enclosed in {{}} (double curly brackets) will be read as a private variable and interpolated into the file from the credential.yml file. For example:

./say-something/pipeline.yml

---
jobs:
- name: job-say-something
  public: true
  plan:
  - task: say-something
    config:
      platform: linux
      image: docker:///busybox
      run:
        path: echo
        args: [{{message}}]

./say-something/credentials.yml

---
message: Hello world!

Properties are listed at the top level of the credential YAML definition.

Common fly commands

To login and create a local session, you would run:

fly --target example login --concourse-url 'https://ci.example.com'

To register this pipeline, you would run:

fly --target example set-pipeline --pipeline say-something --config ./say-something/pipeline.yml --load-vars-from ./say-something/credentials.yml

To destroy the pipeline in Concourse, you would run:

fly --target example destroy-pipeline --pipeline say-something

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.