UNPKG

11.6 kBMarkdownView Raw
1# Pipelines Plugin for Heroku Toolbelt
2
3[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
4
5[![npm
6version](https://img.shields.io/npm/v/heroku-pipelines.svg)](https://www.npmjs.com/package/heroku-pipelines)
7[![build status](https://img.shields.io/circleci/project/heroku/heroku-pipelines.svg)](https://circleci.com/gh/heroku/heroku-pipelines)
8[![codecov](https://codecov.io/gh/heroku/heroku-pipelines/branch/master/graph/badge.svg)](https://codecov.io/gh/heroku/heroku-pipelines)
9
10A Heroku CLI plugin for [continuous delivery](https://www.heroku.com/continuous-delivery) on Heroku.
11
12This 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.
13
14## How to install this plugin
15
16This plugin is installed by default with the
17[Heroku CLI](https://cli.heroku.com/). You do not need to install it
18yourself. Just update your CLI:
19
20```
21$ heroku update
22```
23
24## Using Pipelines
25
26https://devcenter.heroku.com/articles/pipelines
27
28## Development
29
30First, please read [Developing CLI Plugins on Heroku's DevCenter](https://devcenter.heroku.com/articles/developing-toolbelt-plug-ins).
31
32#### Run Tests
33
34```
35$ npm test
36```
37
38#### Deploy
39
401. Release a new version of this npm package.
41
42 ```
43 $ npm version patch/minor/major
44 ```
45
462. Open a new pr in https://github.com/heroku/cli/blob/master/package.json, updating to the appropriate heroku-pipelines version.
47
48
49#### Commands
50
51<!-- commands -->
52* [`heroku pipelines`](#heroku-pipelines)
53* [`heroku pipelines:add PIPELINE`](#heroku-pipelinesadd-pipeline)
54* [`heroku pipelines:connect [NAME]`](#heroku-pipelinesconnect-name)
55* [`heroku pipelines:create [NAME]`](#heroku-pipelinescreate-name)
56* [`heroku pipelines:destroy PIPELINE`](#heroku-pipelinesdestroy-pipeline)
57* [`heroku pipelines:diff`](#heroku-pipelinesdiff)
58* [`heroku pipelines:info PIPELINE`](#heroku-pipelinesinfo-pipeline)
59* [`heroku pipelines:list`](#heroku-pipelineslist)
60* [`heroku pipelines:open PIPELINE`](#heroku-pipelinesopen-pipeline)
61* [`heroku pipelines:promote`](#heroku-pipelinespromote)
62* [`heroku pipelines:remove`](#heroku-pipelinesremove)
63* [`heroku pipelines:rename PIPELINE NAME`](#heroku-pipelinesrename-pipeline-name)
64* [`heroku pipelines:setup [NAME] [REPO]`](#heroku-pipelinessetup-name-repo)
65* [`heroku pipelines:transfer OWNER`](#heroku-pipelinestransfer-owner)
66* [`heroku reviewapps:disable`](#heroku-reviewappsdisable)
67* [`heroku reviewapps:enable`](#heroku-reviewappsenable)
68
69## `heroku pipelines`
70
71list pipelines you have access to
72
73```
74USAGE
75 $ heroku pipelines
76
77OPTIONS
78 --json output in json format
79
80EXAMPLES
81 $ heroku pipelines
82 === My Pipelines
83 example
84 sushi
85```
86
87## `heroku pipelines:add PIPELINE`
88
89add this app to a pipeline
90
91```
92USAGE
93 $ heroku pipelines:add PIPELINE
94
95ARGUMENTS
96 PIPELINE name of pipeline
97
98OPTIONS
99 -a, --app=app (required) app to run command against
100 -r, --remote=remote git remote of app to use
101 -s, --stage=stage stage of first app in pipeline
102
103DESCRIPTION
104 The app and pipeline names must be specified.
105 The stage of the app will be guessed based on its name if not specified.
106
107EXAMPLES
108 $ heroku pipelines:add example -a example-admin -s production
109 Adding example-admin to example pipeline as production... done
110```
111
112## `heroku pipelines:connect [NAME]`
113
114connect a github repo to an existing pipeline
115
116```
117USAGE
118 $ heroku pipelines:connect [NAME]
119
120ARGUMENTS
121 NAME name of pipeline
122
123OPTIONS
124 -r, --repo=repo (required) the GitHub repository to connect
125
126EXAMPLES
127 $ heroku pipelines:connect example -r githuborg/reponame
128 Configuring pipeline... done
129```
130
131## `heroku pipelines:create [NAME]`
132
133create a new pipeline
134
135```
136USAGE
137 $ heroku pipelines:create [NAME]
138
139ARGUMENTS
140 NAME name of pipeline, defaults to basename of app
141
142OPTIONS
143 -a, --app=app (required) app to run command against
144 -r, --remote=remote git remote of app to use
145 -s, --stage=stage stage of first app in pipeline
146 -t, --team=team team to use
147
148DESCRIPTION
149 An existing app must be specified as the first app in the pipeline.
150 The pipeline name will be inferred from the app name if not specified.
151 The stage of the app will be guessed based on its name if not specified.
152 The pipeline owner will be the user creating the pipeline if not specified with -t for teams or -o for orgs.
153
154EXAMPLES
155 $ heroku pipelines:create -a example-staging
156 ? Pipeline name: example
157 ? Stage of example-staging: staging
158 Creating example pipeline... done
159 Adding example-staging to example pipeline as staging... done
160```
161
162## `heroku pipelines:destroy PIPELINE`
163
164destroy a pipeline
165
166```
167USAGE
168 $ heroku pipelines:destroy PIPELINE
169
170ARGUMENTS
171 PIPELINE name of pipeline
172
173EXAMPLES
174 $ heroku pipelines:destroy example
175 Destroying example pipeline... done
176```
177
178## `heroku pipelines:diff`
179
180compares the latest release of this app to its downstream app(s)
181
182```
183USAGE
184 $ heroku pipelines:diff
185
186OPTIONS
187 -a, --app=app (required) app to run command against
188 -r, --remote=remote git remote of app to use
189
190EXAMPLES
191 $ heroku pipelines:diff --app murmuring-headland-14719
192```
193
194## `heroku pipelines:info PIPELINE`
195
196show list of apps in a pipeline
197
198```
199USAGE
200 $ heroku pipelines:info PIPELINE
201
202ARGUMENTS
203 PIPELINE pipeline to show
204
205OPTIONS
206 --json output in json format
207
208EXAMPLES
209 $ heroku pipelines:info example
210 === example
211 owner: my-team (team)
212
213 app name stage
214 ─────────────────────────── ──────────
215 ⬢ example-pr-16 review
216 ⬢ example-pr-19 review
217 ⬢ example-pr-23 review
218 ⬢ example-staging staging
219 ⬢ example-staging-2 staging
220 ⬢ example-production production
221```
222
223## `heroku pipelines:list`
224
225list pipelines you have access to
226
227```
228USAGE
229 $ heroku pipelines:list
230
231OPTIONS
232 --json output in json format
233
234EXAMPLES
235 $ heroku pipelines
236 === My Pipelines
237 example
238 sushi
239```
240
241## `heroku pipelines:open PIPELINE`
242
243open a pipeline in dashboard
244
245```
246USAGE
247 $ heroku pipelines:open PIPELINE
248
249ARGUMENTS
250 PIPELINE name of pipeline
251
252EXAMPLES
253 $ heroku pipelines:open example
254```
255
256## `heroku pipelines:promote`
257
258promote the latest release of this app to its downstream app(s)
259
260```
261USAGE
262 $ heroku pipelines:promote
263
264OPTIONS
265 -a, --app=app (required) app to run command against
266 -r, --remote=remote git remote of app to use
267 -t, --to=to comma separated list of apps to promote to
268
269EXAMPLES
270 $ heroku pipelines:promote -a example-staging
271 Promoting example-staging to example (production)... done, v23
272 Promoting example-staging to example-admin (production)... done, v54
273
274 $ heroku pipelines:promote -a example-staging --to my-production-app1,my-production-app2
275 Starting promotion to apps: my-production-app1,my-production-app2... done
276 Waiting for promotion to complete... done
277 Promotion successful
278 my-production-app1: succeeded
279 my-production-app2: succeeded
280```
281
282## `heroku pipelines:remove`
283
284remove this app from its pipeline
285
286```
287USAGE
288 $ heroku pipelines:remove
289
290OPTIONS
291 -a, --app=app (required) app to run command against
292 -r, --remote=remote git remote of app to use
293
294EXAMPLES
295 $ heroku pipelines:remove -a example-admin
296 Removing example-admin... done
297```
298
299## `heroku pipelines:rename PIPELINE NAME`
300
301rename a pipeline
302
303```
304USAGE
305 $ heroku pipelines:rename PIPELINE NAME
306
307ARGUMENTS
308 PIPELINE current name of pipeline
309 NAME new name of pipeline
310
311EXAMPLES
312 $ heroku pipelines:rename example www
313 Renaming example pipeline to www... done
314```
315
316## `heroku pipelines:setup [NAME] [REPO]`
317
318bootstrap a new pipeline with common settings and create a production and staging app (requires a fully formed app.json in the repo)
319
320```
321USAGE
322 $ heroku pipelines:setup [NAME] [REPO]
323
324ARGUMENTS
325 NAME name of pipeline
326 REPO a GitHub repository to connect the pipeline to
327
328OPTIONS
329 -t, --team=team team to use
330 -y, --yes accept all default settings without prompting
331
332EXAMPLES
333 $ heroku pipelines:setup example githuborg/reponame -o example-org
334 ? Automatically deploy the master branch to staging? Yes
335 ? Wait for CI to pass before deploying the master branch to staging? Yes
336 ? Enable review apps? Yes
337 ? Automatically create review apps for every PR? Yes
338 ? Automatically destroy idle review apps after 5 days? Yes
339 ? Enable automatic Heroku CI test runs? Yes
340 Creating pipeline... done
341 Linking to repo... done
342 Creating production and staging apps (⬢ example and ⬢ example-staging)
343 Configuring pipeline... done
344 View your new pipeline by running `heroku pipelines:open e5a55ffa-de3f-11e6-a245-3c15c2e6bc1e`
345```
346
347## `heroku pipelines:transfer OWNER`
348
349transfer ownership of a pipeline
350
351```
352USAGE
353 $ heroku pipelines:transfer OWNER
354
355ARGUMENTS
356 OWNER the owner to transfer the pipeline to
357
358OPTIONS
359 -c, --confirm=confirm
360 -p, --pipeline=pipeline (required) name of pipeline
361
362EXAMPLES
363 $ heroku pipelines:transfer me@example.com -p example
364 === example
365
366 app name stage
367 ──────────────────── ───────────
368 ⬢ example-dev development
369 ⬢ example-staging staging
370 ⬢ example-prod production
371
372 ▸ This will transfer example and all of the listed apps to the me@example.com account
373 ▸ to proceed, type example or re-run this command with --confirm example
374 > example
375 Transferring example pipeline to the me@example.com account... done
376
377 $ heroku pipelines:transfer acme-widgets -p example
378 === example
379
380 app name stage
381 ──────────────────── ───────────
382 ⬢ example-dev development
383 ⬢ example-staging staging
384 ⬢ example-prod production
385
386 ▸ This will transfer example and all of the listed apps to the acme-widgets team
387 ▸ to proceed, type example or re-run this command with --confirm example
388 > example
389
390 Transferring example pipeline to the acme-widgets team... done
391```
392
393## `heroku reviewapps:disable`
394
395disable review apps or settings on an existing pipeline
396
397```
398USAGE
399 $ heroku reviewapps:disable
400
401OPTIONS
402 -a, --app=app (required) parent app used by review apps
403 -p, --pipeline=pipeline (required) name of pipeline
404 -r, --remote=remote git remote of parent app used by review apps
405 --autodeploy disable autodeployments
406 --autodestroy disable automatically destroying review apps
407
408EXAMPLES
409 $ heroku reviewapps:disable -p mypipeline -a myapp --autodeploy
410 Disabling auto deployment ...
411 Configuring pipeline... done
412```
413
414## `heroku reviewapps:enable`
415
416enable review apps and/or settings on an existing pipeline
417
418```
419USAGE
420 $ heroku reviewapps:enable
421
422OPTIONS
423 -a, --app=app (required) parent app used by review apps
424 -p, --pipeline=pipeline (required) name of pipeline
425 -r, --remote=remote git remote of parent app used by review apps
426 --autodeploy autodeploy the review app
427 --autodestroy autodestroy the review app
428
429EXAMPLES
430 $ heroku reviewapps:enable -p mypipeline --a myapp --autodeploy --autodestroy
431 Enabling review apps ...
432 Enabling auto deployment ...
433 Enabling auto destroy ...
434 Configuring pipeline... done
435```
436<!-- commandsstop -->
437
\No newline at end of file