heroku_hatchet 5.0.2 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4eff388a9b8a640e00f9a7d71dca8c63c044eb68133a3fab77c948e52d5b8e10
4
- data.tar.gz: 005704cca536d304d4c59100aa70ac92da1230fb6a5f8d2deaab5acd68670407
3
+ metadata.gz: aaba14f0335f61010579c2a28cebb4ddc3745673cd2bf9e60a79b9b77772fba1
4
+ data.tar.gz: 46d867946f075054f67d2a5a1262ef203cfe20e19f6f025b2761f76a65b5b886
5
5
  SHA512:
6
- metadata.gz: ddedca5de3df3a7e677a6689eb06b4d7cda13a5593b6f46bd8f621b1ae954bc3ea4cd22c6f7872822f12424dcd2884192823ff458b9e2155d4f7e8236d73c746
7
- data.tar.gz: 961a6edc1894a16668b001f692fca7976eba92123e16fc110f5275f38d4d780e097762642ad833a888fa4acaa7289c4beccb695c6e75f44f037e20633e84c097
6
+ metadata.gz: c241f9a5422e4fba52afa9bb86c2e593452ab021bf111707deea9f6a132d7b4ea3afcba69b95575b82628838e5433e502ba9f64cf1cda8beaa8c764eb56dbd29
7
+ data.tar.gz: b65f318865923df9da5aeb17e86bb39a1633b787b0497a5d991361650d816925accb986a2c0b015d6b67c949fc0cf67408a83373810a46328c9c353e0203af8e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 5.0.3
4
+
5
+ - Allow repos to be "locked" to master instead of a specific commit (https://github.com/heroku/hatchet/pull/80)
6
+
3
7
  ## 5.0.2
4
8
 
5
9
  - Fix `before_deploy` use with ci test runs (https://github.com/heroku/hatchet/pull/78)
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
- commit = commit_at_directory(directory)
79
- lock_hash[directory] = commit
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
@@ -10,5 +10,8 @@
10
10
  "sharpstone/rails5_ruby_schema_format",
11
11
  "sharpstone/rails5_ci_fails_no_database"
12
12
  ],
13
- "lock": ["sharpstone/lock_fail"]
13
+ "lock": [
14
+ "sharpstone/lock_fail",
15
+ "sharpstone/lock_fail_master"
16
+ ]
14
17
  }
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
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "5.0.2"
2
+ VERSION = "5.0.3"
3
3
  end
@@ -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.2
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-24 00:00:00.000000000 Z
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