Skip to main content
U.S. flag

An official website of the United States government

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Continuous deployment


This guide assumes that you already have:

1. Getting deployer credentials

Use the instructions on to create a deployer account for your app. Your deployer credentials will regularly expire, so please make sure to update them periodically.

2. Configure the continuous integration service

Circle CI

Add your deployer service credentials as environment variables to CircleCI. Save them as the CF_USERNAME and CF_PASSWORD.

Update .circleci/config.yml

version: 2.1

    # Your test configuration goes here.
    # Ruby -
    # Python -
    # JS -

      # This image has the latest cf-cli as well as zero downtime plugins, if needed.
      - image: governmentpaas/cf-cli:latest

      - checkout
      - run:
          name: deploy to
          command: |
            # Set $CF_USERNAME and $CF_PASSWORD in CircleCI settings.
            # $CF_ORG, $CF_SPACE, and $APP_NAME can also be set in CircleCI settings or hardcoded here.
            cf api
            cf auth "$CF_USERNAME" "$CF_PASSWORD"
            cf target -o "$CF_ORG" -s "$CF_SPACE"
            cf zero-downtime-push "$APP_NAME" -p '.' -f path/to/manifest.yml

      - test:
              ignore: master
      - test:
              only: master
      - deploy:
            - test
              only: master


Add manifests (and Cloud Foundry) use manifest files to specify how an app should be built on You will now add two separate files, a manifest.yml for your production app and a manifest-staging.yml for your development application.

Generally your production application will have multiple instances while your staging will only have one. Manifests can be short and sweet, or extensive. See the full cloud foundry documentation on manifests.

For an example manifest and manifest-staging see:

Zero downtime deploy options

  • Standard The native Cloud Foundry rolling app deployments CLI is preferred over other options.
  • Caution Autopilot is a plugin historically used by a lot of TTS projects and used in both of the above examples. It is now unmaintained and archived and does not support buildpacks. We recommend moving to the official CF deployment commands.
    • If you are using autopilot and your application successfully deploys to but does not start, which may happen for an application that does not have an adequate test suite, you may have to go into the cf target space and manually delete the "APP_NAME-venerable" application in order to make use of autopilot again.
  • blue-green-deploy another plugin similar to autopilot.
  • See an official CircleCI / Cloud Foundry Orb

18F Engineering

An official website of the GSA’s Technology Transformation Services

Looking for U.S. government information and services?