heroku_hatchet 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/hatchet/app.rb +22 -23
- data/lib/hatchet/version.rb +1 -1
- data/test/hatchet/ci_three_test.rb +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eff388a9b8a640e00f9a7d71dca8c63c044eb68133a3fab77c948e52d5b8e10
|
4
|
+
data.tar.gz: 005704cca536d304d4c59100aa70ac92da1230fb6a5f8d2deaab5acd68670407
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddedca5de3df3a7e677a6689eb06b4d7cda13a5593b6f46bd8f621b1ae954bc3ea4cd22c6f7872822f12424dcd2884192823ff458b9e2155d4f7e8236d73c746
|
7
|
+
data.tar.gz: 961a6edc1894a16668b001f692fca7976eba92123e16fc110f5275f38d4d780e097762642ad833a888fa4acaa7289c4beccb695c6e75f44f037e20633e84c097
|
data/CHANGELOG.md
CHANGED
data/lib/hatchet/app.rb
CHANGED
@@ -315,31 +315,30 @@ module Hatchet
|
|
315
315
|
end
|
316
316
|
|
317
317
|
def run_ci(timeout: 300, &block)
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
318
|
+
in_directory do
|
319
|
+
Hatchet::RETRIES.times.retry do
|
320
|
+
result = create_pipeline
|
321
|
+
@pipeline_id = result["id"]
|
322
|
+
end
|
322
323
|
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
324
|
+
# when the CI run finishes, the associated ephemeral app created for the test run internally gets removed almost immediately
|
325
|
+
# the system then sees a pipeline with no apps, and deletes it, also almost immediately
|
326
|
+
# that would, with bad timing, mean our test run info poll in wait! would 403, and/or the delete_pipeline at the end
|
327
|
+
# that's why we create an app explictly (or maybe it already exists), and then associate it with with the pipeline
|
328
|
+
# the app will be auto cleaned up later
|
329
|
+
self.setup!
|
330
|
+
Hatchet::RETRIES.times.retry do
|
331
|
+
couple_pipeline(@name, @pipeline_id)
|
332
|
+
end
|
332
333
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
in_directory do
|
342
|
-
call_before_deploy
|
334
|
+
test_run = TestRun.new(
|
335
|
+
token: api_key,
|
336
|
+
buildpacks: @buildpacks,
|
337
|
+
timeout: timeout,
|
338
|
+
app: self,
|
339
|
+
pipeline: @pipeline_id,
|
340
|
+
api_rate_limit: api_rate_limit
|
341
|
+
)
|
343
342
|
|
344
343
|
Hatchet::RETRIES.times.retry do
|
345
344
|
test_run.create_test_run
|
data/lib/hatchet/version.rb
CHANGED
@@ -2,8 +2,19 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class CIThreeTest < Minitest::Test
|
4
4
|
def test_error_with_bad_app
|
5
|
-
|
5
|
+
@before_deploy_called = false
|
6
|
+
@before_deploy_dir_pwd = nil
|
7
|
+
before_deploy = -> {
|
8
|
+
@before_deploy_called = true
|
9
|
+
@before_deploy_dir_pwd = Dir.pwd
|
10
|
+
}
|
11
|
+
Hatchet::GitApp.new("rails5_ci_fails_no_database", allow_failure: true, before_deploy: before_deploy).run_ci do |test_run|
|
6
12
|
assert_equal :errored, test_run.status
|
13
|
+
assert_equal Dir.pwd, @before_deploy_dir_pwd
|
14
|
+
|
15
|
+
assert @before_deploy_called
|
7
16
|
end
|
17
|
+
|
18
|
+
refute_equal Dir.pwd, @before_deploy_dir_pwd
|
8
19
|
end
|
9
20
|
end
|
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: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|