heroku_hatchet 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +26 -0
- data/bin/hatchet +7 -2
- data/hatchet.json +4 -1
- data/hatchet.lock +2 -0
- data/lib/hatchet/version.rb +1 -1
- data/test/hatchet/lock_test.rb +9 -0
- metadata +2 -3
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaba14f0335f61010579c2a28cebb4ddc3745673cd2bf9e60a79b9b77772fba1
|
4
|
+
data.tar.gz: 46d867946f075054f67d2a5a1262ef203cfe20e19f6f025b2761f76a65b5b886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c241f9a5422e4fba52afa9bb86c2e593452ab021bf111707deea9f6a132d7b4ea3afcba69b95575b82628838e5433e502ba9f64cf1cda8beaa8c764eb56dbd29
|
7
|
+
data.tar.gz: b65f318865923df9da5aeb17e86bb39a1633b787b0497a5d991361650d816925accb986a2c0b015d6b67c949fc0cf67408a83373810a46328c9c353e0203af8e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -92,6 +92,32 @@ Be careful when including repos inside of your test directory. If you're using a
|
|
92
92
|
|
93
93
|
When basing tests on external repos, do not change the tests or they may spontaneously fail. We may create a hatchet.lockfile or something to declare the commit in the future.
|
94
94
|
|
95
|
+
When you run `hatchet install` it will lock all the Repos to a specific commit. This is done so that if a repo changes upstream that introduces an error the test suite won't automatically pick it up. For example in https://github.com/sharpstone/lock_fail/commit/e61ba47043fbae131abb74fd74added7e6e504df an error is added, but this will only cause a failure if your project intentionally locks to commit `e61ba47043fbae131abb74fd74added7e6e504df` or later.
|
96
|
+
|
97
|
+
You can re-lock your projects by running `hatchet lock`. This modifies the `hatchet.lock` file. For example:
|
98
|
+
|
99
|
+
```
|
100
|
+
---
|
101
|
+
- - test/fixtures/repos/bundler/no_lockfile
|
102
|
+
- 1947ce9a9c276d5df1c323b2ad78d1d85c7ab4c0
|
103
|
+
- - test/fixtures/repos/ci/rails5_ci_fails_no_database
|
104
|
+
- 3044f05febdfbbe656f0f5113cf5968ca07e34fd
|
105
|
+
- - test/fixtures/repos/ci/rails5_ruby_schema_format
|
106
|
+
- 3e63c3e13f435cf4ab11265e9abd161cc28cc552
|
107
|
+
- - test/fixtures/repos/default/default_ruby
|
108
|
+
- 6e642963acec0ff64af51bd6fba8db3c4176ed6e
|
109
|
+
- - test/fixtures/repos/lock/lock_fail
|
110
|
+
- da748a59340be8b950e7bbbfb32077eb67d70c3c
|
111
|
+
- - test/fixtures/repos/lock/lock_fail_master
|
112
|
+
- master
|
113
|
+
- - test/fixtures/repos/rails2/rails2blog
|
114
|
+
- b37357a498ae5e8429f5601c5ab9524021dc2aaa
|
115
|
+
- - test/fixtures/repos/rails3/rails3_mri_193
|
116
|
+
- 88c5d0d067cfd11e4452633994a85b04627ae8c7
|
117
|
+
```
|
118
|
+
|
119
|
+
If you don't want to lock a specific commit, you can instead specify `master` and it will always grab the latest commits.
|
120
|
+
|
95
121
|
|
96
122
|
## Deploying apps
|
97
123
|
|
data/bin/hatchet
CHANGED
@@ -67,6 +67,7 @@ class HatchetCLI < Thor
|
|
67
67
|
desc "locks to specific git commits", "updates hatchet.lock"
|
68
68
|
def lock
|
69
69
|
lock_hash = {}
|
70
|
+
lockfile_hash = load_lockfile
|
70
71
|
dirs.map do |directory, git_repo|
|
71
72
|
Threaded.later do
|
72
73
|
puts "== locking #{directory}"
|
@@ -75,8 +76,12 @@ class HatchetCLI < Thor
|
|
75
76
|
clone(directory, git_repo, quiet: false)
|
76
77
|
end
|
77
78
|
|
78
|
-
|
79
|
-
|
79
|
+
if lockfile_hash[directory] == "master"
|
80
|
+
lock_hash[directory] = "master"
|
81
|
+
else
|
82
|
+
commit = commit_at_directory(directory)
|
83
|
+
lock_hash[directory] = commit
|
84
|
+
end
|
80
85
|
end
|
81
86
|
end.map(&:join)
|
82
87
|
|
data/hatchet.json
CHANGED
data/hatchet.lock
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
- 6e642963acec0ff64af51bd6fba8db3c4176ed6e
|
10
10
|
- - test/fixtures/repos/lock/lock_fail
|
11
11
|
- da748a59340be8b950e7bbbfb32077eb67d70c3c
|
12
|
+
- - test/fixtures/repos/lock/lock_fail_master
|
13
|
+
- master
|
12
14
|
- - test/fixtures/repos/rails2/rails2blog
|
13
15
|
- b37357a498ae5e8429f5601c5ab9524021dc2aaa
|
14
16
|
- - test/fixtures/repos/rails3/rails3_mri_193
|
data/lib/hatchet/version.rb
CHANGED
data/test/hatchet/lock_test.rb
CHANGED
@@ -6,4 +6,13 @@ class LockTest < Minitest::Test
|
|
6
6
|
assert app.deployed?
|
7
7
|
end
|
8
8
|
end
|
9
|
+
|
10
|
+
def test_app_with_failure_can_be_locked_to_master
|
11
|
+
puts `bundle exec hatchet lock`
|
12
|
+
|
13
|
+
lock = YAML.load_file("hatchet.lock")
|
14
|
+
name, branch = lock.select {|k,v| k.end_with?("lock_fail_master") }.first
|
15
|
+
assert_equal "test/fixtures/repos/lock/lock_fail_master", name
|
16
|
+
assert_equal "master", branch
|
17
|
+
end
|
9
18
|
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.3
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|
@@ -203,7 +203,6 @@ files:
|
|
203
203
|
- ".circleci/config.yml"
|
204
204
|
- ".github/workflows/check_changelog.yml"
|
205
205
|
- ".gitignore"
|
206
|
-
- ".travis.yml"
|
207
206
|
- CHANGELOG.md
|
208
207
|
- Gemfile
|
209
208
|
- LICENSE.txt
|
data/.travis.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.3.1
|
4
|
-
before_script:
|
5
|
-
- bundle exec hatchet ci:setup
|
6
|
-
script: bundle exec parallel_test test/hatchet -n 11
|
7
|
-
after_script: bundle exec rake hatchet:teardown_travis
|
8
|
-
env:
|
9
|
-
global:
|
10
|
-
- HATCHET_BUILDPACK_BRANCH=master
|
11
|
-
- HATCHET_RETRIES=3
|
12
|
-
- HATCHET_APP_LIMIT=80
|
13
|
-
- secure: KvuEChRTZYrWd1Q4PKt3YM5FkfuCAOtsKgjC4HDGjCYVNee3793XGwAr0e5LiQqrvHDmbJS7ZPelV3ptor2QJTdmZjPhu/tZKPMLQg7wm8vTcrJflkJDqJl6ECxd40zbUgmo+wSPSvx+K3ZGKqLF4D43vvFJaqBUoAVOGdt66c8=
|
14
|
-
- secure: XuJ4XUraWzNlfY9a+6Mh9lVlLuRY988YAaA8LKQOe2KAT5MRqcZzqlKOwDeTWK0tas68bzK7T8RT/L+6/nck0u5VrPHMhkc8QDBSqcle8kFcBxf/64EnCzB40lZoxvcdQ3wm8E41DRwsI7hAHLdVVNXC8f1/wQOAm77nOEvPdvM=
|
15
|
-
sudo: true
|
16
|
-
dist: trusty
|