heroku_hatchet 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +22 -9
- data/lib/hatchet/tasks.rb +2 -2
- data/lib/hatchet/test_run.rb +1 -1
- data/lib/hatchet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8596154413de5982e37e4436abde9157a16a617a
|
4
|
+
data.tar.gz: ad14d6ed42cdff6b0c836a2f5f9542f8f59496a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d0c3568d2d1a2412414037238ec6f9d99d09a09e01aef4e6141a74b37748482d6b40d931a260a2ba3d876d878135f7c7204de74d80595c6a6c28fad5d26c447
|
7
|
+
data.tar.gz: df24e71f8545d30e4c1bb8ec90d4aa1178b49c1ac298a4215a9330a24d6e027d2eb5eeed058c170f0e2af2da5373cf1b9140c81e6f0e918a491704ea8105d0e4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,21 +12,34 @@ First run:
|
|
12
12
|
|
13
13
|
$ bundle install
|
14
14
|
|
15
|
-
This library uses the heroku
|
16
|
-
available to the system.
|
15
|
+
This library uses the heroku CLI and API, you will need to make your API key
|
16
|
+
available to the system. If you're running on a CI platform you'll need to generate an OAuth token and make it available on the system you're running on.
|
17
17
|
|
18
|
-
|
18
|
+
To get a token, first install the https://github.com/heroku/heroku-cli-oauth#creating plugin, then you can get your token by running:
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
```sh
|
21
|
+
$ heroku authorizations:create --description "For Travis"
|
22
|
+
Creating OAuth Authorization... done
|
23
|
+
Client: <none>
|
24
|
+
ID: <id value>
|
25
|
+
Description: For Travis
|
26
|
+
Scope: global
|
27
|
+
Token: <token>
|
28
|
+
```
|
22
29
|
|
30
|
+
You'll set the `<token>` value to the `HEROKU_API_KEY` env var. For example on Travis you could add it like this:
|
23
31
|
|
24
|
-
|
32
|
+
```sh
|
33
|
+
$ travis encrypt HEROKU_API_KEY=<token> --add
|
34
|
+
```
|
25
35
|
|
26
|
-
|
36
|
+
You'll also need an email address that goes with your token:
|
37
|
+
|
38
|
+
```sh
|
39
|
+
$ travis encrypt HEROKU_API_USER=<example@example.com> --add
|
40
|
+
```
|
27
41
|
|
28
|
-
|
29
|
-
it will be pulled automatically via shelling out, but this is slower.
|
42
|
+
If you're running locally, your system credentials will be pulled from `heroku auth:token`
|
30
43
|
|
31
44
|
## Run the Tests
|
32
45
|
|
data/lib/hatchet/tasks.rb
CHANGED
@@ -16,14 +16,14 @@ namespace :hatchet do
|
|
16
16
|
File.open(netrc, 'w') do |file|
|
17
17
|
file.write <<EOF
|
18
18
|
machine git.heroku.com
|
19
|
-
login
|
19
|
+
login #{ENV['HEROKU_API_USER']}
|
20
20
|
password #{ENV['HEROKU_API_KEY']}
|
21
21
|
EOF
|
22
22
|
end
|
23
23
|
end
|
24
24
|
[
|
25
25
|
"bundle exec hatchet install",
|
26
|
-
"if [ `git config --get user.email` ]; then echo 'already set'; else `git config --global user.email '
|
26
|
+
"if [ `git config --get user.email` ]; then echo 'already set'; else `git config --global user.email '#{ENV['HEROKU_API_USER']}'`; fi",
|
27
27
|
"if [ `git config --get user.name` ]; then echo 'already set'; else `git config --global user.name 'BuildpackTester'` ; fi",
|
28
28
|
"echo '#{config_ssh}' >> ~/.ssh/config",
|
29
29
|
"curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://toolbelt.heroku.com/install-ubuntu.sh | sh",
|
data/lib/hatchet/test_run.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Hatchet
|
2
2
|
class FailedTestError < StandardError
|
3
3
|
def initialize(app, output)
|
4
|
-
msg = "Could run tests on pipeline id: '#{app.pipeline_id}' (#{app.repo_name}) at path: '#{app.directory}'\n" <<
|
4
|
+
msg = "Could not run tests on pipeline id: '#{app.pipeline_id}' (#{app.repo_name}) at path: '#{app.directory}'\n" <<
|
5
5
|
" if this was expected add `allow_failure: true` to your hatchet initialization hash.\n" <<
|
6
6
|
"output:\n" <<
|
7
7
|
"#{output}"
|
data/lib/hatchet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_hatchet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|