/heroku-pipelines

Heroku Pipelines Plugin for Heroku Toolbelt

Primary LanguageJavaScript

Pipelines Plugin for Heroku Toolbelt

npm version build status

A Heroku CLI plugin for continuous delivery on Heroku.

This plugin is used to set up a collection of apps sharing a common codebase where the latest slug of one app can be promoted to the app(s) in the following stage. The promotion only copies the upstream build artifact and leaves the downstream app's config vars, add-ons, and Git repo untouched.

How to install this plugin

This plugin is installed by default with the Heroku Toolbelt. You do not need to install it yourself. Just update your Toolbelt and plugins:

$ heroku update

Create a pipeline

$ heroku pipelines:create -a example # NAME and -s STAGE are optional and implied from app name
? Pipeline name: example
? Stage of example: production
Creating example pipeline... done
Adding example to example pipeline as production... done

Add apps to a pipeline

$ heroku pipelines:add example -a example-admin -s production
Adding example-admin to example pipeline as production... done

$ heroku pipelines:add -a example-staging example
? Stage of example-staging: staging
Adding example-staging to example pipeline as staging... done

List pipelines

$ heroku pipelines:list # Repo isn't yet returned
example github:heroku/example
sushi   github:heroku/sushi

Show pipeline detail

$ heroku pipelines:info example # Source and Flow aren't returned yet
=== example
Source type: github
Source repo: heroku/example
Staging:     example-staging
Production:  example
             example-admin
Flow:        example-staging --> example, example-admin

Diff an app in a pipeline

$ heroku pipelines:diff -a my-app-staging
Fetching apps from pipeline... done
Fetching release info for all apps... done

my-app-staging is up to date with my-app

Promote an app in a pipeline

$ heroku pipelines:promote -r staging
Fetching app info... done
Fetching apps from my-pipeline... done
Starting promotion to production... done
Waiting for promotion to complete... done

Promotion successful
My-App:    succeeded
My-App-Eu: succeeded

Promote to specified apps in a pipeline

$ heroku pipelines:promote -a example-staging --to my-production-app1,my-production-app2
Starting promotion to apps: my-production-app1,my-production-app2... done
Waiting for promotion to complete... done
Promotion successful
my-production-app1: succeeded
my-production-app2: succeeded

Update apps in a pipeline

$ heroku pipelines:update -s staging -a example-admin
Changing example-admin to staging... done

Remove app from a pipeline

$ heroku pipelines:remove -a example-admin
Removing example-admin... done

Rename pipeline

$ heroku pipelines:rename example www
Renaming example pipeline to www... done

Destroy pipeline

$ heroku pipelines:destroy www
Destroying www pipeline... done

Open a pipeline in Dashboard

$ heroku pipelines:open example
Opening dashboard... done

TODO

  • heroku pipelines:status [-a APP | -r REMOTE]
  • heroku pipelines:list with repo
  • heroku pipelines:info with full information