Skip to content

Commit c9b7dbb

Browse files
jmar910RasPhilCo
authored andcommitted
feat(pipelines): add reviewapps:enable command (#1269)
1 parent eacf5bc commit c9b7dbb

File tree

21 files changed

+3429
-167
lines changed

21 files changed

+3429
-167
lines changed

packages/cli/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@heroku-cli/plugin-oauth-v5": "^7.24.0",
2727
"@heroku-cli/plugin-orgs-v5": "^7.26.0",
2828
"@heroku-cli/plugin-pg-v5": "^7.25.0",
29+
"@heroku-cli/plugin-pipelines": "3.0.0-alpha.1",
2930
"@heroku-cli/plugin-pipelines-v5": "^7.26.0",
3031
"@heroku-cli/plugin-ps": "^7.24.0",
3132
"@heroku-cli/plugin-ps-exec": "2.3.5",
@@ -121,6 +122,7 @@
121122
"@heroku-cli/plugin-oauth-v5",
122123
"@heroku-cli/plugin-orgs-v5",
123124
"@heroku-cli/plugin-pg-v5",
125+
"@heroku-cli/plugin-pipelines",
124126
"@heroku-cli/plugin-pipelines-v5",
125127
"@heroku-cli/plugin-ps",
126128
"@heroku-cli/plugin-ps-exec",

packages/pipelines-v5/commands/review_apps/enable.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

packages/pipelines-v5/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ exports.commands = flatten([
1919
require('./commands/pipelines/rename.js'),
2020
require('./commands/pipelines/setup.js'),
2121
require('./commands/pipelines/transfer.js'),
22-
require('./commands/review_apps/disable.js'),
23-
require('./commands/review_apps/enable.js')
22+
require('./commands/review_apps/disable.js')
2423
])
2524

2625
exports.disambiguatePipeline = require('./lib/disambiguate')

packages/pipelines-v5/test/commands/review_apps/enable.js

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
version: 2
3+
jobs:
4+
node-latest: &test
5+
docker:
6+
- image: node:latest
7+
working_directory: ~/cli
8+
steps:
9+
- checkout
10+
- restore_cache: &restore_cache
11+
keys:
12+
- v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
13+
- v1-npm-{{checksum ".circleci/config.yml"}}
14+
- run:
15+
name: Install dependencies
16+
command: yarn
17+
- run: ./bin/run --help
18+
- run:
19+
name: Testing
20+
command: yarn test
21+
- run:
22+
name: Submitting code coverage to codecov
23+
command: |
24+
./node_modules/.bin/nyc report --reporter text-lcov > coverage.lcov
25+
curl -s https://codecov.io/bash | bash
26+
node-8:
27+
<<: *test
28+
docker:
29+
- image: node:8
30+
node-10:
31+
<<: *test
32+
docker:
33+
- image: node:10
34+
cache:
35+
<<: *test
36+
steps:
37+
- checkout
38+
- run:
39+
name: Install dependencies
40+
command: yarn
41+
- save_cache:
42+
key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
43+
paths:
44+
- ~/cli/node_modules
45+
- /usr/local/share/.cache/yarn
46+
- /usr/local/share/.config/yarn
47+
48+
workflows:
49+
version: 2
50+
"reviewapps":
51+
jobs:
52+
- node-latest
53+
- node-8
54+
- node-10
55+
- cache:
56+
filters:
57+
tags:
58+
only: /^v.*/
59+
branches:
60+
ignore: /.*/

packages/pipelines/.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

packages/pipelines/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*-debug.log
2+
*-error.log
3+
/.nyc_output
4+
/dist
5+
/lib
6+
/package-lock.json
7+
/tmp
8+
node_modules

packages/pipelines/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
reviewapps
2+
==========
3+
4+
5+
6+
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
7+
[![Version](https://img.shields.io/npm/v/reviewapps.svg)](https://npmjs.org/package/reviewapps)
8+
[![CircleCI](https://circleci.com/gh/jmar910/reviewapps/tree/master.svg?style=shield)](https://circleci.com/gh/jmar910/reviewapps/tree/master)
9+
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/jmar910/reviewapps?branch=master&svg=true)](https://ci.appveyor.com/project/jmar910/reviewapps/branch/master)
10+
[![Codecov](https://codecov.io/gh/jmar910/reviewapps/branch/master/graph/badge.svg)](https://codecov.io/gh/jmar910/reviewapps)
11+
[![Downloads/week](https://img.shields.io/npm/dw/reviewapps.svg)](https://npmjs.org/package/reviewapps)
12+
[![License](https://img.shields.io/npm/l/reviewapps.svg)](https://github.com/jmar910/reviewapps/blob/master/package.json)
13+
14+
<!-- toc -->
15+
* [Usage](#usage)
16+
* [Commands](#commands)
17+
<!-- tocstop -->
18+
# Usage
19+
<!-- usage -->
20+
```sh-session
21+
$ npm install -g reviewapps
22+
$ oclif-example COMMAND
23+
running command...
24+
$ oclif-example (-v|--version|version)
25+
reviewapps/0.0.0 darwin-x64 node-v10.13.0
26+
$ oclif-example --help [COMMAND]
27+
USAGE
28+
$ oclif-example COMMAND
29+
...
30+
```
31+
<!-- usagestop -->
32+
# Commands
33+
<!-- commands -->
34+
* [`oclif-example hello [FILE]`](#oclif-example-hello-file)
35+
36+
## `oclif-example hello [FILE]`
37+
38+
describe the command here
39+
40+
```
41+
USAGE
42+
$ oclif-example hello [FILE]
43+
44+
OPTIONS
45+
-f, --force
46+
-h, --help show CLI help
47+
-n, --name=name name to print
48+
49+
EXAMPLE
50+
$ oclif-example hello
51+
hello world from ./src/hello.ts!
52+
```
53+
54+
_See code: [src/commands/hello.ts](https://github.com/jmar910/reviewapps/blob/v0.0.0/src/commands/hello.ts)_
55+
<!-- commandsstop -->

packages/pipelines/appveyor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
environment:
2+
nodejs_version: "10"
3+
cache:
4+
- '%LOCALAPPDATA%\Yarn -> appveyor.yml'
5+
- node_modules -> yarn.lock
6+
7+
install:
8+
- ps: Install-Product node $env:nodejs_version x64
9+
- yarn
10+
test_script:
11+
- .\bin\run --help
12+
- yarn test
13+
14+
after_test:
15+
- .\node_modules\.bin\nyc report --reporter text-lcov > coverage.lcov
16+
- ps: |
17+
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
18+
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
19+
bash codecov.sh
20+
21+
22+
build: off
23+

packages/pipelines/bin/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
3+
require('@oclif/command').run()
4+
.catch(require('@oclif/errors/handle'))

0 commit comments

Comments
 (0)