shipit-engine 0.20.1 → 0.21.0
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 +5 -5
- data/README.md +43 -6
- data/app/assets/stylesheets/_base/_base.scss +4 -0
- data/app/assets/stylesheets/_pages/_commits.scss +3 -1
- data/app/assets/stylesheets/_pages/_deploy.scss +4 -2
- data/app/controllers/concerns/shipit/authentication.rb +1 -1
- data/app/controllers/shipit/api/base_controller.rb +6 -1
- data/app/controllers/shipit/api/pull_requests_controller.rb +1 -1
- data/app/controllers/shipit/commit_checks_controller.rb +1 -1
- data/app/controllers/shipit/shipit_controller.rb +1 -5
- data/app/controllers/shipit/stacks_controller.rb +2 -0
- data/app/controllers/shipit/tasks_controller.rb +1 -1
- data/app/controllers/shipit/webhooks_controller.rb +2 -2
- data/app/helpers/shipit/deploys_helper.rb +9 -0
- data/app/helpers/shipit/shipit_helper.rb +17 -15
- data/app/helpers/shipit/stacks_helper.rb +6 -1
- data/app/jobs/shipit/destroy_stack_job.rb +4 -2
- data/app/jobs/shipit/fetch_deployed_revision_job.rb +1 -1
- data/app/jobs/shipit/github_sync_job.rb +1 -1
- data/app/jobs/shipit/merge_pull_requests_job.rb +3 -3
- data/app/jobs/shipit/perform_task_job.rb +3 -0
- data/app/jobs/shipit/purge_old_deliveries_job.rb +1 -0
- data/app/models/shipit/api_client.rb +1 -1
- data/app/models/shipit/commit.rb +29 -6
- data/app/models/shipit/commit_deployment.rb +1 -1
- data/app/models/shipit/commit_deployment_status.rb +1 -1
- data/app/models/shipit/deploy_spec.rb +19 -2
- data/app/models/shipit/deploy_spec/bundler_discovery.rb +1 -10
- data/app/models/shipit/deploy_spec/file_system.rb +6 -0
- data/app/models/shipit/deploy_spec/kubernetes_discovery.rb +1 -1
- data/app/models/shipit/deploy_spec/lerna_discovery.rb +85 -0
- data/app/models/shipit/deploy_spec/npm_discovery.rb +103 -5
- data/app/models/shipit/deploy_spec/pypi_discovery.rb +4 -2
- data/app/models/shipit/deploy_spec/rubygems_discovery.rb +4 -2
- data/app/models/shipit/duration.rb +1 -1
- data/app/models/shipit/github_status.rb +1 -1
- data/app/models/shipit/hook.rb +4 -5
- data/app/models/shipit/output_chunk.rb +1 -1
- data/app/models/shipit/pull_request.rb +36 -15
- data/app/models/shipit/stack.rb +15 -9
- data/app/models/shipit/status/common.rb +4 -0
- data/app/models/shipit/status/group.rb +4 -0
- data/app/models/shipit/task.rb +20 -8
- data/app/models/shipit/task_definition.rb +2 -2
- data/app/models/shipit/undeployed_commit.rb +13 -2
- data/app/models/shipit/user.rb +1 -1
- data/app/serializers/shipit/pull_request_serializer.rb +1 -1
- data/app/serializers/shipit/tail_task_serializer.rb +1 -1
- data/app/views/shipit/ccmenu/project.xml.builder +9 -8
- data/app/views/shipit/deploys/_deploy.html.erb +3 -2
- data/app/views/shipit/stacks/_banners.html.erb +4 -1
- data/app/views/shipit/stacks/settings.html.erb +4 -0
- data/app/views/shipit/statuses/_group.html.erb +1 -1
- data/app/views/shipit/statuses/_status.html.erb +1 -1
- data/app/views/shipit/tasks/_task.html.erb +1 -2
- data/config/locales/en.yml +2 -0
- data/config/secrets.development.example.yml +0 -4
- data/config/secrets.development.shopify.yml +1 -5
- data/db/migrate/20170904103242_reindex_deliveries.rb +7 -0
- data/db/migrate/20171120161420_add_base_info_to_pull_request.rb +7 -0
- data/db/migrate/20180202220850_add_aborted_by_to_tasks.rb +5 -0
- data/lib/shipit.rb +15 -23
- data/lib/shipit/command.rb +11 -3
- data/lib/shipit/engine.rb +0 -4
- data/lib/shipit/stack_commands.rb +3 -1
- data/lib/shipit/version.rb +1 -1
- data/lib/snippets/assert-lerna-fixed-version-tag +21 -0
- data/lib/snippets/assert-lerna-independent-version-tags +28 -0
- data/lib/snippets/generate-local-npmrc +19 -0
- data/lib/snippets/misconfigured-npm-publish-config +8 -0
- data/lib/snippets/publish-lerna-independent-packages +39 -0
- data/lib/snippets/push-to-heroku +5 -5
- data/lib/tasks/cron.rake +1 -1
- data/lib/tasks/dev.rake +1 -1
- data/test/controllers/api/deploys_controller_test.rb +19 -0
- data/test/controllers/api/stacks_controller_test.rb +1 -1
- data/test/controllers/github_authentication_controller_test.rb +1 -1
- data/test/controllers/stacks_controller_test.rb +10 -0
- data/test/controllers/tasks_controller_test.rb +2 -0
- data/test/controllers/webhooks_controller_test.rb +0 -7
- data/test/dummy/config/secrets.yml +0 -2
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +5 -3
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/fixtures/shipit/commits.yml +53 -0
- data/test/fixtures/shipit/pull_requests.yml +52 -0
- data/test/fixtures/shipit/stacks.yml +35 -0
- data/test/fixtures/shipit/statuses.yml +27 -0
- data/test/fixtures/shipit/tasks.yml +14 -0
- data/test/helpers/queries_helper.rb +1 -1
- data/test/jobs/merge_pull_requests_job_test.rb +19 -2
- data/test/jobs/perform_task_job_test.rb +26 -2
- data/test/models/commits_test.rb +55 -6
- data/test/models/deploy_spec_test.rb +288 -52
- data/test/models/deploys_test.rb +7 -7
- data/test/models/hook_test.rb +4 -3
- data/test/models/pull_request_test.rb +78 -24
- data/test/models/stacks_test.rb +21 -17
- data/test/models/status/group_test.rb +6 -0
- data/test/models/undeployed_commits_test.rb +9 -0
- data/test/models/users_test.rb +2 -2
- data/test/test_helper.rb +1 -1
- metadata +211 -222
- data/app/assets/javascripts/shipit_bs.js.coffee +0 -2
- data/app/assets/stylesheets/shipit_bs.scss +0 -22
- data/app/views/bootstrap/shipit/missing_settings.html.erb +0 -97
- data/app/views/bootstrap/shipit/stacks/new.html.erb +0 -44
- data/app/views/layouts/shipit_bootstrap.html.erb +0 -44
- data/lib/shipit/template_renderer_extension.rb +0 -16
data/test/models/deploys_test.rb
CHANGED
|
@@ -229,7 +229,7 @@ module Shipit
|
|
|
229
229
|
@deploy = shipit_deploys(:shipit_running)
|
|
230
230
|
@deploy.complete!
|
|
231
231
|
@stack.reload
|
|
232
|
-
assert_in_delta @deploy.ended_at, @stack.last_deployed_at,
|
|
232
|
+
assert_in_delta @deploy.ended_at, @stack.last_deployed_at, 2
|
|
233
233
|
end
|
|
234
234
|
|
|
235
235
|
test "transitioning to success schedule a MergePullRequests job" do
|
|
@@ -264,7 +264,7 @@ module Shipit
|
|
|
264
264
|
@deploy = shipit_deploys(:shipit_running)
|
|
265
265
|
@deploy.ping
|
|
266
266
|
@deploy.pid = 42
|
|
267
|
-
@deploy.abort!(rollback_once_aborted: true)
|
|
267
|
+
@deploy.abort!(rollback_once_aborted: true, aborted_by: @user)
|
|
268
268
|
|
|
269
269
|
assert_difference -> { @stack.rollbacks.count }, 1 do
|
|
270
270
|
assert_enqueued_with(job: PerformTaskJob) do
|
|
@@ -346,12 +346,12 @@ module Shipit
|
|
|
346
346
|
|
|
347
347
|
test "abort! transition to `aborting`" do
|
|
348
348
|
@deploy.ping
|
|
349
|
-
@deploy.abort!
|
|
349
|
+
@deploy.abort!(aborted_by: @user)
|
|
350
350
|
assert_equal 'aborting', @deploy.status
|
|
351
351
|
end
|
|
352
352
|
|
|
353
353
|
test "abort! schedule the rollback if `rollback_once_aborted` is true" do
|
|
354
|
-
@deploy.abort!(rollback_once_aborted: true)
|
|
354
|
+
@deploy.abort!(rollback_once_aborted: true, aborted_by: @user)
|
|
355
355
|
assert_predicate @deploy.reload, :rollback_once_aborted?
|
|
356
356
|
end
|
|
357
357
|
|
|
@@ -359,11 +359,11 @@ module Shipit
|
|
|
359
359
|
@deploy.ping
|
|
360
360
|
aborts = []
|
|
361
361
|
|
|
362
|
-
@deploy.abort!
|
|
362
|
+
@deploy.abort!(aborted_by: @user)
|
|
363
363
|
@deploy.should_abort? { |abort_count| aborts << abort_count }
|
|
364
364
|
assert_equal [1], aborts
|
|
365
365
|
|
|
366
|
-
3.times { @deploy.abort! }
|
|
366
|
+
3.times { @deploy.abort!(aborted_by: @user) }
|
|
367
367
|
@deploy.should_abort? { |abort_count| aborts << abort_count }
|
|
368
368
|
assert_equal [1, 2, 3, 4], aborts
|
|
369
369
|
end
|
|
@@ -373,7 +373,7 @@ module Shipit
|
|
|
373
373
|
refute_predicate @deploy, :alive?
|
|
374
374
|
refute_predicate @deploy, :finished?
|
|
375
375
|
|
|
376
|
-
@deploy.abort!
|
|
376
|
+
@deploy.abort!(aborted_by: @user)
|
|
377
377
|
assert_predicate @deploy, :error?
|
|
378
378
|
end
|
|
379
379
|
|
data/test/models/hook_test.rb
CHANGED
|
@@ -58,14 +58,15 @@ module Shipit
|
|
|
58
58
|
|
|
59
59
|
test "#purge_old_deliveries!" do
|
|
60
60
|
Hook.deliver(:deploy, @stack, 'foo' => 42)
|
|
61
|
+
@hook.deliveries.update_all(status: 'sent')
|
|
61
62
|
|
|
62
|
-
previous_ids = @hook.deliveries.order(
|
|
63
|
+
previous_ids = @hook.deliveries.sent.order(id: :desc).pluck(:id)
|
|
63
64
|
|
|
64
|
-
assert_difference -> { @hook.deliveries.count }, -1 do
|
|
65
|
+
assert_difference -> { @hook.deliveries.sent.count }, -1 do
|
|
65
66
|
@hook.purge_old_deliveries!(keep: 1)
|
|
66
67
|
end
|
|
67
68
|
|
|
68
|
-
after_ids = @hook.deliveries.order(
|
|
69
|
+
after_ids = @hook.deliveries.sent.order(id: :desc).pluck(:id)
|
|
69
70
|
assert_equal previous_ids[0..-2], after_ids
|
|
70
71
|
end
|
|
71
72
|
end
|
|
@@ -29,7 +29,7 @@ module Shipit
|
|
|
29
29
|
PullRequest.request_merge!(@stack, @pr.number, @user)
|
|
30
30
|
assert_predicate @pr.reload, :pending?
|
|
31
31
|
assert_not_equal original_merge_requested_at, @pr.merge_requested_at
|
|
32
|
-
assert_in_delta Time.now.utc, @pr.merge_requested_at,
|
|
32
|
+
assert_in_delta Time.now.utc, @pr.merge_requested_at, 2
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
test ".request_merge! retry rejected pull requests" do
|
|
@@ -39,7 +39,7 @@ module Shipit
|
|
|
39
39
|
PullRequest.request_merge!(@stack, @pr.number, @user)
|
|
40
40
|
assert_predicate @pr.reload, :pending?
|
|
41
41
|
assert_not_equal original_merge_requested_at, @pr.merge_requested_at
|
|
42
|
-
assert_in_delta Time.now.utc, @pr.merge_requested_at,
|
|
42
|
+
assert_in_delta Time.now.utc, @pr.merge_requested_at, 2
|
|
43
43
|
assert_nil @pr.rejection_reason
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -68,6 +68,7 @@ module Shipit
|
|
|
68
68
|
pull_request = shipit_pull_requests(:shipit_fetching)
|
|
69
69
|
|
|
70
70
|
head_sha = '64b3833d39def7ec65b57b42f496eb27ab4980b6'
|
|
71
|
+
base_sha = 'ba7ab50e02286f7d6c60c1ef75258133dd9ea763'
|
|
71
72
|
Shipit.github_api.expects(:pull_request).with(@stack.github_repo_name, pull_request.number).returns(
|
|
72
73
|
stub(
|
|
73
74
|
id: 4_857_578,
|
|
@@ -82,6 +83,10 @@ module Shipit
|
|
|
82
83
|
ref: 'super-branch',
|
|
83
84
|
sha: head_sha,
|
|
84
85
|
),
|
|
86
|
+
base: stub(
|
|
87
|
+
ref: 'default-branch',
|
|
88
|
+
sha: base_sha,
|
|
89
|
+
),
|
|
85
90
|
),
|
|
86
91
|
)
|
|
87
92
|
|
|
@@ -91,22 +96,25 @@ module Shipit
|
|
|
91
96
|
name: 'Bob the Builder',
|
|
92
97
|
email: 'bob@bob.com',
|
|
93
98
|
)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
|
|
100
|
+
[head_sha, base_sha].each do |sha|
|
|
101
|
+
Shipit.github_api.expects(:commit).with(@stack.github_repo_name, sha).returns(
|
|
102
|
+
stub(
|
|
103
|
+
sha: sha,
|
|
104
|
+
author: author,
|
|
105
|
+
committer: author,
|
|
106
|
+
commit: stub(
|
|
107
|
+
message: 'Great feature',
|
|
108
|
+
author: stub(date: 1.day.ago),
|
|
109
|
+
committer: stub(date: 1.day.ago),
|
|
110
|
+
),
|
|
111
|
+
stats: stub(
|
|
112
|
+
additions: 24,
|
|
113
|
+
deletions: 5,
|
|
114
|
+
),
|
|
107
115
|
),
|
|
108
|
-
)
|
|
109
|
-
|
|
116
|
+
)
|
|
117
|
+
end
|
|
110
118
|
|
|
111
119
|
Shipit.github_api.expects(:statuses).with(@stack.github_repo_name, head_sha).returns([stub(
|
|
112
120
|
state: 'success',
|
|
@@ -156,21 +164,30 @@ module Shipit
|
|
|
156
164
|
assert_equal 'merge_conflict', @pr.rejection_reason
|
|
157
165
|
end
|
|
158
166
|
|
|
159
|
-
test "#reject_unless_mergeable! rejects the PR if it has a failing
|
|
160
|
-
@pr.head.statuses.create!(stack: @pr.stack, state: '
|
|
167
|
+
test "#reject_unless_mergeable! rejects the PR if it has a failing CI status" do
|
|
168
|
+
@pr.head.statuses.create!(stack: @pr.stack, state: 'failure', context: 'ci/circle')
|
|
161
169
|
|
|
162
170
|
refute_predicate @pr, :all_status_checks_passed?
|
|
171
|
+
assert_predicate @pr, :any_status_checks_failed?
|
|
163
172
|
assert_equal true, @pr.reject_unless_mergeable!
|
|
164
173
|
assert_predicate @pr, :rejected?
|
|
165
174
|
assert_equal 'ci_failing', @pr.rejection_reason
|
|
166
175
|
end
|
|
167
176
|
|
|
168
|
-
test "#
|
|
169
|
-
@pr.
|
|
177
|
+
test "#reject_unless_mergeable! does not reject the PR if it has a pending CI status" do
|
|
178
|
+
@pr.head.statuses.create!(stack: @pr.stack, state: 'pending', context: 'ci/circle')
|
|
170
179
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
180
|
+
refute_predicate @pr, :all_status_checks_passed?
|
|
181
|
+
refute_predicate @pr, :any_status_checks_failed?
|
|
182
|
+
assert_equal false, @pr.reject_unless_mergeable!
|
|
183
|
+
refute_predicate @pr, :rejected?
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
test "#reject_unless_mergeable! rejects the PR if it is stale" do
|
|
187
|
+
@pr.stubs(:stale?).returns(true)
|
|
188
|
+
assert_equal true, @pr.reject_unless_mergeable!
|
|
189
|
+
assert_predicate @pr, :rejected?
|
|
190
|
+
assert_equal 'requires_rebase', @pr.rejection_reason
|
|
174
191
|
end
|
|
175
192
|
|
|
176
193
|
test "#merge! raises a PullRequest::NotReady if the PR isn't mergeable yet" do
|
|
@@ -211,5 +228,42 @@ module Shipit
|
|
|
211
228
|
@stack.reload
|
|
212
229
|
end
|
|
213
230
|
end
|
|
231
|
+
|
|
232
|
+
test "#all_status_checks_passed? returns false when head commit is unknown" do
|
|
233
|
+
@pr.update(head_id: nil)
|
|
234
|
+
refute_predicate @pr, :all_status_checks_passed?
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
test "#stale? returns false by default" do
|
|
238
|
+
refute_predicate @pr, :stale?
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
test "#stale? returns true when the branch falls behind the maximum commits" do
|
|
242
|
+
@pr.base_commit = shipit_commits(:second)
|
|
243
|
+
@pr.base_ref = 'default-branch'
|
|
244
|
+
Shipit.github_api.expects(:compare).with(@stack.github_repo_name, @pr.base_ref, @pr.head.sha).returns(
|
|
245
|
+
stub(
|
|
246
|
+
behind_by: 10,
|
|
247
|
+
),
|
|
248
|
+
)
|
|
249
|
+
spec = {'merge' => {'max_divergence' => {'commits' => 1}}}
|
|
250
|
+
@pr.stack.cached_deploy_spec = DeploySpec.new(spec)
|
|
251
|
+
assert_predicate @pr, :stale?
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
test "#stale? returns true when the branch falls behind the maximum age" do
|
|
255
|
+
@pr.base_commit = shipit_commits(:second)
|
|
256
|
+
@pr.head.committed_at = 2.hours.ago
|
|
257
|
+
spec = {'merge' => {'max_divergence' => {'age' => '1h'}}}
|
|
258
|
+
@pr.stack.cached_deploy_spec = DeploySpec.new(spec)
|
|
259
|
+
assert_predicate @pr, :stale?
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
test "#stale? is false when base_commit information is missing" do
|
|
263
|
+
@pr.base_commit = nil
|
|
264
|
+
spec = {'merge' => {'max_divergence' => {'age' => '1h', 'commits' => 10}}}
|
|
265
|
+
@pr.stack.cached_deploy_spec = DeploySpec.new(spec)
|
|
266
|
+
refute_predicate @pr, :stale?
|
|
267
|
+
end
|
|
214
268
|
end
|
|
215
269
|
end
|
data/test/models/stacks_test.rb
CHANGED
|
@@ -4,7 +4,7 @@ module Shipit
|
|
|
4
4
|
class StacksTest < ActiveSupport::TestCase
|
|
5
5
|
def setup
|
|
6
6
|
@stack = shipit_stacks(:shipit)
|
|
7
|
-
@expected_base_path = Rails.root.join('data
|
|
7
|
+
@expected_base_path = Rails.root.join('data', 'stacks', @stack.to_param).to_s
|
|
8
8
|
GithubHook.any_instance.stubs(:teardown!)
|
|
9
9
|
end
|
|
10
10
|
|
|
@@ -573,38 +573,42 @@ module Shipit
|
|
|
573
573
|
assert_equal shipit_commits(:third), @stack.next_commit_to_deploy
|
|
574
574
|
end
|
|
575
575
|
|
|
576
|
-
test "#
|
|
576
|
+
test "setting #lock_reason also sets #locked_since" do
|
|
577
|
+
assert_predicate @stack.locked_since, :nil?
|
|
578
|
+
|
|
579
|
+
@stack.update!(lock_reason: "Here comes the walrus")
|
|
580
|
+
refute_predicate @stack.locked_since, :nil?
|
|
581
|
+
|
|
582
|
+
@stack.update!(lock_reason: nil)
|
|
583
|
+
assert_predicate @stack.locked_since, :nil?
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
test "updating #lock_reason preserves #locked_since" do
|
|
587
|
+
@stack.update!(lock_reason: "Here comes the walrus")
|
|
588
|
+
expected = @stack.locked_since
|
|
589
|
+
|
|
590
|
+
@stack.update!(lock_reason: "The walrus strikes back")
|
|
591
|
+
assert_equal expected, @stack.locked_since
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
test "#lock sets reason and user" do
|
|
577
595
|
reason = "Here comes the walrus"
|
|
578
596
|
user = shipit_users(:walrus)
|
|
579
597
|
@stack.lock(reason, user)
|
|
580
598
|
assert @stack.locked?
|
|
581
599
|
assert_equal reason, @stack.lock_reason
|
|
582
600
|
assert_equal user, @stack.lock_author
|
|
583
|
-
assert_not_nil user, @stack.locked_since
|
|
584
601
|
end
|
|
585
602
|
|
|
586
|
-
test "#unlock deletes reason
|
|
603
|
+
test "#unlock deletes reason and user" do
|
|
587
604
|
user = shipit_users(:walrus)
|
|
588
605
|
@stack.lock("Here comes the walrus", user)
|
|
589
606
|
@stack.unlock
|
|
590
607
|
refute @stack.locked?
|
|
591
608
|
assert_nil @stack.lock_reason
|
|
592
|
-
assert_nil @stack.locked_since
|
|
593
609
|
assert_not_equal user, @stack.lock_author
|
|
594
610
|
end
|
|
595
611
|
|
|
596
|
-
test "#lock does not overwrite locked_since if already locked" do
|
|
597
|
-
@stack.lock("Here comes the walrus", shipit_users(:walrus))
|
|
598
|
-
old_time = @stack.locked_since
|
|
599
|
-
|
|
600
|
-
new_reason = "Its still coming!"
|
|
601
|
-
@stack.lock(new_reason, shipit_users(:walrus))
|
|
602
|
-
|
|
603
|
-
assert @stack.locked?
|
|
604
|
-
assert_equal new_reason, @stack.lock_reason
|
|
605
|
-
assert_equal old_time, @stack.locked_since
|
|
606
|
-
end
|
|
607
|
-
|
|
608
612
|
test "stack contains valid deploy_url" do
|
|
609
613
|
@stack.deploy_url = "Javascript:alert(0);//"
|
|
610
614
|
assert_not_predicate @stack, :valid?
|
|
@@ -24,6 +24,12 @@ module Shipit
|
|
|
24
24
|
assert_equal 'failure', @group.state
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
test "#blocking? returns true if any of the status is blocking" do
|
|
28
|
+
blocking_status = shipit_statuses(:soc_first)
|
|
29
|
+
assert_predicate blocking_status, :blocking?
|
|
30
|
+
Status::Group.new(blocking_status.commit, [blocking_status])
|
|
31
|
+
end
|
|
32
|
+
|
|
27
33
|
test ".compact returns a regular status if there is only one visible status" do
|
|
28
34
|
status = Status::Group.compact(@commit, @commit.statuses.where(context: 'ci/travis'))
|
|
29
35
|
assert_instance_of Status, status
|
|
@@ -68,6 +68,15 @@ module Shipit
|
|
|
68
68
|
assert_equal 'failure', @commit.deploy_state(true)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
test "#deploy_state returns `blocked` if a previous commit is blocking" do
|
|
72
|
+
blocking_commit = shipit_commits(:soc_second)
|
|
73
|
+
blocking_commit.statuses.delete_all
|
|
74
|
+
assert_predicate blocking_commit, :blocking?
|
|
75
|
+
|
|
76
|
+
commit = UndeployedCommit.new(shipit_commits(:soc_third), 0)
|
|
77
|
+
assert_equal 'blocked', commit.deploy_state
|
|
78
|
+
end
|
|
79
|
+
|
|
71
80
|
test "#redeploy_state returns `allowed` by default" do
|
|
72
81
|
assert_equal 'allowed', @commit.redeploy_state
|
|
73
82
|
end
|
data/test/models/users_test.rb
CHANGED
|
@@ -69,7 +69,7 @@ module Shipit
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
test "#refresh_from_github! update the user with the latest data from GitHub's API" do
|
|
72
|
-
Shipit.github_api.expects(:user).with(
|
|
72
|
+
Shipit.github_api.expects(:user).with(@user.github_id).returns(@github_user)
|
|
73
73
|
@user.refresh_from_github!
|
|
74
74
|
@user.reload
|
|
75
75
|
|
|
@@ -82,7 +82,7 @@ module Shipit
|
|
|
82
82
|
user.update!(github_id: @github_user.id)
|
|
83
83
|
commit = user.authored_commits.last
|
|
84
84
|
|
|
85
|
-
Shipit.github_api.expects(:user).with(user.
|
|
85
|
+
Shipit.github_api.expects(:user).with(user.github_id).raises(Octokit::NotFound)
|
|
86
86
|
Shipit.github_api.expects(:commit).with(commit.github_repo_name, commit.sha).returns(mock(author: @github_user))
|
|
87
87
|
|
|
88
88
|
assert_equal 'bob', user.login
|
data/test/test_helper.rb
CHANGED
|
@@ -49,7 +49,7 @@ class ActiveSupport::TestCase
|
|
|
49
49
|
teardown do
|
|
50
50
|
Shipit.redis.flushdb
|
|
51
51
|
Shipit.instance_variable_names.each do |name|
|
|
52
|
-
next if
|
|
52
|
+
next if %w(@mocha @redis).include?(name)
|
|
53
53
|
Shipit.remove_instance_variable(name)
|
|
54
54
|
end
|
|
55
55
|
end
|
metadata
CHANGED
|
@@ -1,239 +1,225 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shipit-engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jean Boussier
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-04-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: active_model_serializers
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 0.9.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 0.9.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: ansi_stream
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 0.0.6
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 0.0.6
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: attr_encrypted
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.0
|
|
47
|
+
version: 3.1.0
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 1.0
|
|
54
|
+
version: 3.1.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: autoprefixer-rails
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: 6.4.1
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
68
|
+
version: 6.4.1
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: coffee-rails
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
75
|
+
version: '4.2'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
82
|
+
version: '4.2'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: explicit-parameters
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.
|
|
89
|
+
version: 0.3.0
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.
|
|
96
|
+
version: 0.3.0
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: faraday
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 0.9.
|
|
103
|
+
version: 0.9.1
|
|
104
104
|
type: :runtime
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 0.9.
|
|
110
|
+
version: 0.9.1
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: faraday-http-cache
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
117
|
+
version: 1.2.2
|
|
118
118
|
type: :runtime
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - "~>"
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
124
|
+
version: 1.2.2
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
126
|
+
name: gemoji
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - "~>"
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 1
|
|
131
|
+
version: '2.1'
|
|
132
132
|
type: :runtime
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - "~>"
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 1
|
|
138
|
+
version: '2.1'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
140
|
+
name: jquery-rails
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - "~>"
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
|
-
version:
|
|
145
|
+
version: 4.1.0
|
|
146
146
|
type: :runtime
|
|
147
147
|
prerelease: false
|
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements:
|
|
150
150
|
- - "~>"
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
|
-
version:
|
|
152
|
+
version: 4.1.0
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
|
-
name:
|
|
154
|
+
name: lodash-rails
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
156
156
|
requirements:
|
|
157
157
|
- - "~>"
|
|
158
158
|
- !ruby/object:Gem::Version
|
|
159
|
-
version:
|
|
159
|
+
version: 4.6.1
|
|
160
160
|
type: :runtime
|
|
161
161
|
prerelease: false
|
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
163
|
requirements:
|
|
164
164
|
- - "~>"
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
|
-
version:
|
|
166
|
+
version: 4.6.1
|
|
167
167
|
- !ruby/object:Gem::Dependency
|
|
168
|
-
name:
|
|
168
|
+
name: octokit
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
|
171
171
|
- - "~>"
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
|
-
version:
|
|
173
|
+
version: 4.8.0
|
|
174
174
|
type: :runtime
|
|
175
175
|
prerelease: false
|
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
178
|
- - "~>"
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
|
-
version:
|
|
181
|
-
- !ruby/object:Gem::Dependency
|
|
182
|
-
name: sprockets-rails
|
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
|
184
|
-
requirements:
|
|
185
|
-
- - ">="
|
|
186
|
-
- !ruby/object:Gem::Version
|
|
187
|
-
version: 2.3.2
|
|
188
|
-
type: :runtime
|
|
189
|
-
prerelease: false
|
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
191
|
-
requirements:
|
|
192
|
-
- - ">="
|
|
193
|
-
- !ruby/object:Gem::Version
|
|
194
|
-
version: 2.3.2
|
|
180
|
+
version: 4.8.0
|
|
195
181
|
- !ruby/object:Gem::Dependency
|
|
196
|
-
name:
|
|
182
|
+
name: omniauth-github
|
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
|
198
184
|
requirements:
|
|
199
185
|
- - "~>"
|
|
200
186
|
- !ruby/object:Gem::Version
|
|
201
|
-
version:
|
|
187
|
+
version: 1.1.2
|
|
202
188
|
type: :runtime
|
|
203
189
|
prerelease: false
|
|
204
190
|
version_requirements: !ruby/object:Gem::Requirement
|
|
205
191
|
requirements:
|
|
206
192
|
- - "~>"
|
|
207
193
|
- !ruby/object:Gem::Version
|
|
208
|
-
version:
|
|
194
|
+
version: 1.1.2
|
|
209
195
|
- !ruby/object:Gem::Dependency
|
|
210
|
-
name:
|
|
196
|
+
name: pubsubstub
|
|
211
197
|
requirement: !ruby/object:Gem::Requirement
|
|
212
198
|
requirements:
|
|
213
199
|
- - "~>"
|
|
214
200
|
- !ruby/object:Gem::Version
|
|
215
|
-
version:
|
|
201
|
+
version: 0.1.2
|
|
216
202
|
type: :runtime
|
|
217
203
|
prerelease: false
|
|
218
204
|
version_requirements: !ruby/object:Gem::Requirement
|
|
219
205
|
requirements:
|
|
220
206
|
- - "~>"
|
|
221
207
|
- !ruby/object:Gem::Version
|
|
222
|
-
version:
|
|
208
|
+
version: 0.1.2
|
|
223
209
|
- !ruby/object:Gem::Dependency
|
|
224
|
-
name:
|
|
210
|
+
name: rails
|
|
225
211
|
requirement: !ruby/object:Gem::Requirement
|
|
226
212
|
requirements:
|
|
227
213
|
- - "~>"
|
|
228
214
|
- !ruby/object:Gem::Version
|
|
229
|
-
version:
|
|
215
|
+
version: 5.1.0
|
|
230
216
|
type: :runtime
|
|
231
217
|
prerelease: false
|
|
232
218
|
version_requirements: !ruby/object:Gem::Requirement
|
|
233
219
|
requirements:
|
|
234
220
|
- - "~>"
|
|
235
221
|
- !ruby/object:Gem::Version
|
|
236
|
-
version:
|
|
222
|
+
version: 5.1.0
|
|
237
223
|
- !ruby/object:Gem::Dependency
|
|
238
224
|
name: rails-timeago
|
|
239
225
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -249,159 +235,159 @@ dependencies:
|
|
|
249
235
|
- !ruby/object:Gem::Version
|
|
250
236
|
version: 2.13.0
|
|
251
237
|
- !ruby/object:Gem::Dependency
|
|
252
|
-
name:
|
|
238
|
+
name: rails_autolink
|
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
|
254
240
|
requirements:
|
|
255
241
|
- - "~>"
|
|
256
242
|
- !ruby/object:Gem::Version
|
|
257
|
-
version:
|
|
243
|
+
version: 1.1.6
|
|
258
244
|
type: :runtime
|
|
259
245
|
prerelease: false
|
|
260
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
261
247
|
requirements:
|
|
262
248
|
- - "~>"
|
|
263
249
|
- !ruby/object:Gem::Version
|
|
264
|
-
version:
|
|
250
|
+
version: 1.1.6
|
|
265
251
|
- !ruby/object:Gem::Dependency
|
|
266
|
-
name:
|
|
252
|
+
name: rake
|
|
267
253
|
requirement: !ruby/object:Gem::Requirement
|
|
268
254
|
requirements:
|
|
269
255
|
- - "~>"
|
|
270
256
|
- !ruby/object:Gem::Version
|
|
271
|
-
version:
|
|
257
|
+
version: '10.0'
|
|
272
258
|
type: :runtime
|
|
273
259
|
prerelease: false
|
|
274
260
|
version_requirements: !ruby/object:Gem::Requirement
|
|
275
261
|
requirements:
|
|
276
262
|
- - "~>"
|
|
277
263
|
- !ruby/object:Gem::Version
|
|
278
|
-
version:
|
|
264
|
+
version: '10.0'
|
|
279
265
|
- !ruby/object:Gem::Dependency
|
|
280
|
-
name:
|
|
266
|
+
name: redis-namespace
|
|
281
267
|
requirement: !ruby/object:Gem::Requirement
|
|
282
268
|
requirements:
|
|
283
269
|
- - "~>"
|
|
284
270
|
- !ruby/object:Gem::Version
|
|
285
|
-
version:
|
|
271
|
+
version: 1.5.2
|
|
286
272
|
type: :runtime
|
|
287
273
|
prerelease: false
|
|
288
274
|
version_requirements: !ruby/object:Gem::Requirement
|
|
289
275
|
requirements:
|
|
290
276
|
- - "~>"
|
|
291
277
|
- !ruby/object:Gem::Version
|
|
292
|
-
version:
|
|
278
|
+
version: 1.5.2
|
|
293
279
|
- !ruby/object:Gem::Dependency
|
|
294
|
-
name:
|
|
280
|
+
name: redis-objects
|
|
295
281
|
requirement: !ruby/object:Gem::Requirement
|
|
296
282
|
requirements:
|
|
297
283
|
- - "~>"
|
|
298
284
|
- !ruby/object:Gem::Version
|
|
299
|
-
version: 1.1
|
|
285
|
+
version: 1.2.1
|
|
300
286
|
type: :runtime
|
|
301
287
|
prerelease: false
|
|
302
288
|
version_requirements: !ruby/object:Gem::Requirement
|
|
303
289
|
requirements:
|
|
304
290
|
- - "~>"
|
|
305
291
|
- !ruby/object:Gem::Version
|
|
306
|
-
version: 1.1
|
|
292
|
+
version: 1.2.1
|
|
307
293
|
- !ruby/object:Gem::Dependency
|
|
308
|
-
name:
|
|
294
|
+
name: responders
|
|
309
295
|
requirement: !ruby/object:Gem::Requirement
|
|
310
296
|
requirements:
|
|
311
297
|
- - "~>"
|
|
312
298
|
- !ruby/object:Gem::Version
|
|
313
|
-
version:
|
|
299
|
+
version: 2.4.0
|
|
314
300
|
type: :runtime
|
|
315
301
|
prerelease: false
|
|
316
302
|
version_requirements: !ruby/object:Gem::Requirement
|
|
317
303
|
requirements:
|
|
318
304
|
- - "~>"
|
|
319
305
|
- !ruby/object:Gem::Version
|
|
320
|
-
version:
|
|
306
|
+
version: 2.4.0
|
|
321
307
|
- !ruby/object:Gem::Dependency
|
|
322
|
-
name:
|
|
308
|
+
name: safe_yaml
|
|
323
309
|
requirement: !ruby/object:Gem::Requirement
|
|
324
310
|
requirements:
|
|
325
|
-
- -
|
|
311
|
+
- - "~>"
|
|
326
312
|
- !ruby/object:Gem::Version
|
|
327
|
-
version:
|
|
313
|
+
version: 1.0.4
|
|
328
314
|
type: :runtime
|
|
329
315
|
prerelease: false
|
|
330
316
|
version_requirements: !ruby/object:Gem::Requirement
|
|
331
317
|
requirements:
|
|
332
|
-
- -
|
|
318
|
+
- - "~>"
|
|
333
319
|
- !ruby/object:Gem::Version
|
|
334
|
-
version:
|
|
320
|
+
version: 1.0.4
|
|
335
321
|
- !ruby/object:Gem::Dependency
|
|
336
|
-
name:
|
|
322
|
+
name: sass-rails
|
|
337
323
|
requirement: !ruby/object:Gem::Requirement
|
|
338
324
|
requirements:
|
|
339
325
|
- - "~>"
|
|
340
326
|
- !ruby/object:Gem::Version
|
|
341
|
-
version:
|
|
327
|
+
version: '5.0'
|
|
342
328
|
type: :runtime
|
|
343
329
|
prerelease: false
|
|
344
330
|
version_requirements: !ruby/object:Gem::Requirement
|
|
345
331
|
requirements:
|
|
346
332
|
- - "~>"
|
|
347
333
|
- !ruby/object:Gem::Version
|
|
348
|
-
version:
|
|
334
|
+
version: '5.0'
|
|
349
335
|
- !ruby/object:Gem::Dependency
|
|
350
|
-
name:
|
|
336
|
+
name: securecompare
|
|
351
337
|
requirement: !ruby/object:Gem::Requirement
|
|
352
338
|
requirements:
|
|
353
339
|
- - "~>"
|
|
354
340
|
- !ruby/object:Gem::Version
|
|
355
|
-
version: 0.
|
|
341
|
+
version: 1.0.0
|
|
356
342
|
type: :runtime
|
|
357
343
|
prerelease: false
|
|
358
344
|
version_requirements: !ruby/object:Gem::Requirement
|
|
359
345
|
requirements:
|
|
360
346
|
- - "~>"
|
|
361
347
|
- !ruby/object:Gem::Version
|
|
362
|
-
version: 0.
|
|
348
|
+
version: 1.0.0
|
|
363
349
|
- !ruby/object:Gem::Dependency
|
|
364
|
-
name:
|
|
350
|
+
name: sprockets-rails
|
|
365
351
|
requirement: !ruby/object:Gem::Requirement
|
|
366
352
|
requirements:
|
|
367
|
-
- - "
|
|
353
|
+
- - ">="
|
|
368
354
|
- !ruby/object:Gem::Version
|
|
369
|
-
version:
|
|
355
|
+
version: 2.3.2
|
|
370
356
|
type: :runtime
|
|
371
357
|
prerelease: false
|
|
372
358
|
version_requirements: !ruby/object:Gem::Requirement
|
|
373
359
|
requirements:
|
|
374
|
-
- - "
|
|
360
|
+
- - ">="
|
|
375
361
|
- !ruby/object:Gem::Version
|
|
376
|
-
version:
|
|
362
|
+
version: 2.3.2
|
|
377
363
|
- !ruby/object:Gem::Dependency
|
|
378
|
-
name:
|
|
364
|
+
name: state_machines-activerecord
|
|
379
365
|
requirement: !ruby/object:Gem::Requirement
|
|
380
366
|
requirements:
|
|
381
367
|
- - "~>"
|
|
382
368
|
- !ruby/object:Gem::Version
|
|
383
|
-
version:
|
|
369
|
+
version: 0.5.0
|
|
384
370
|
type: :runtime
|
|
385
371
|
prerelease: false
|
|
386
372
|
version_requirements: !ruby/object:Gem::Requirement
|
|
387
373
|
requirements:
|
|
388
374
|
- - "~>"
|
|
389
375
|
- !ruby/object:Gem::Version
|
|
390
|
-
version:
|
|
376
|
+
version: 0.5.0
|
|
391
377
|
- !ruby/object:Gem::Dependency
|
|
392
|
-
name:
|
|
378
|
+
name: validate_url
|
|
393
379
|
requirement: !ruby/object:Gem::Requirement
|
|
394
380
|
requirements:
|
|
395
381
|
- - "~>"
|
|
396
382
|
- !ruby/object:Gem::Version
|
|
397
|
-
version: 1.
|
|
383
|
+
version: 1.0.0
|
|
398
384
|
type: :runtime
|
|
399
385
|
prerelease: false
|
|
400
386
|
version_requirements: !ruby/object:Gem::Requirement
|
|
401
387
|
requirements:
|
|
402
388
|
- - "~>"
|
|
403
389
|
- !ruby/object:Gem::Version
|
|
404
|
-
version: 1.
|
|
390
|
+
version: 1.0.0
|
|
405
391
|
description:
|
|
406
392
|
email:
|
|
407
393
|
- jean.boussier@shopify.com
|
|
@@ -448,7 +434,6 @@ files:
|
|
|
448
434
|
- app/assets/javascripts/shipit/page_updater.js.coffee
|
|
449
435
|
- app/assets/javascripts/shipit/search.js.coffee
|
|
450
436
|
- app/assets/javascripts/shipit/stacks.js.coffee
|
|
451
|
-
- app/assets/javascripts/shipit_bs.js.coffee
|
|
452
437
|
- app/assets/javascripts/task.js.coffee
|
|
453
438
|
- app/assets/javascripts/task/ansi_colors.js.coffee
|
|
454
439
|
- app/assets/javascripts/task/notifications.js.coffee.erb
|
|
@@ -475,7 +460,6 @@ files:
|
|
|
475
460
|
- app/assets/stylesheets/_structure/_main.scss
|
|
476
461
|
- app/assets/stylesheets/_structure/_navigation.scss
|
|
477
462
|
- app/assets/stylesheets/shipit.scss
|
|
478
|
-
- app/assets/stylesheets/shipit_bs.scss
|
|
479
463
|
- app/assets/webfonts/CheckoutSymbols-Regular.eot
|
|
480
464
|
- app/assets/webfonts/CheckoutSymbols-Regular.svg
|
|
481
465
|
- app/assets/webfonts/CheckoutSymbols-Regular.ttf
|
|
@@ -552,6 +536,7 @@ files:
|
|
|
552
536
|
- app/models/shipit/deploy_spec/capistrano_discovery.rb
|
|
553
537
|
- app/models/shipit/deploy_spec/file_system.rb
|
|
554
538
|
- app/models/shipit/deploy_spec/kubernetes_discovery.rb
|
|
539
|
+
- app/models/shipit/deploy_spec/lerna_discovery.rb
|
|
555
540
|
- app/models/shipit/deploy_spec/npm_discovery.rb
|
|
556
541
|
- app/models/shipit/deploy_spec/pypi_discovery.rb
|
|
557
542
|
- app/models/shipit/deploy_spec/rubygems_discovery.rb
|
|
@@ -591,10 +576,7 @@ files:
|
|
|
591
576
|
- app/serializers/shipit/user_serializer.rb
|
|
592
577
|
- app/validators/ascii_only_validator.rb
|
|
593
578
|
- app/validators/subset_validator.rb
|
|
594
|
-
- app/views/bootstrap/shipit/missing_settings.html.erb
|
|
595
|
-
- app/views/bootstrap/shipit/stacks/new.html.erb
|
|
596
579
|
- app/views/layouts/shipit.html.erb
|
|
597
|
-
- app/views/layouts/shipit_bootstrap.html.erb
|
|
598
580
|
- app/views/shipit/_variables.html.erb
|
|
599
581
|
- app/views/shipit/ccmenu/project.xml.builder
|
|
600
582
|
- app/views/shipit/commit_checks/_checks.html.erb
|
|
@@ -677,6 +659,9 @@ files:
|
|
|
677
659
|
- db/migrate/20170524104615_index_commits_on_stack_id_and_sha.rb
|
|
678
660
|
- db/migrate/20170524125249_fix_tasks_index_by_status.rb
|
|
679
661
|
- db/migrate/20170629141736_add_ignored_safeties_on_tasks.rb
|
|
662
|
+
- db/migrate/20170904103242_reindex_deliveries.rb
|
|
663
|
+
- db/migrate/20171120161420_add_base_info_to_pull_request.rb
|
|
664
|
+
- db/migrate/20180202220850_add_aborted_by_to_tasks.rb
|
|
680
665
|
- lib/shipit-engine.rb
|
|
681
666
|
- lib/shipit.rb
|
|
682
667
|
- lib/shipit/command.rb
|
|
@@ -695,15 +680,19 @@ files:
|
|
|
695
680
|
- lib/shipit/stat.rb
|
|
696
681
|
- lib/shipit/strip_cache_control.rb
|
|
697
682
|
- lib/shipit/task_commands.rb
|
|
698
|
-
- lib/shipit/template_renderer_extension.rb
|
|
699
683
|
- lib/shipit/version.rb
|
|
700
684
|
- lib/snippets/assert-egg-version-tag
|
|
701
685
|
- lib/snippets/assert-gem-version-tag
|
|
686
|
+
- lib/snippets/assert-lerna-fixed-version-tag
|
|
687
|
+
- lib/snippets/assert-lerna-independent-version-tags
|
|
702
688
|
- lib/snippets/assert-npm-version-tag
|
|
703
689
|
- lib/snippets/extract-egg-version
|
|
704
690
|
- lib/snippets/extract-gem-version
|
|
705
691
|
- lib/snippets/fetch-gem-version
|
|
706
692
|
- lib/snippets/fetch-heroku-version
|
|
693
|
+
- lib/snippets/generate-local-npmrc
|
|
694
|
+
- lib/snippets/misconfigured-npm-publish-config
|
|
695
|
+
- lib/snippets/publish-lerna-independent-packages
|
|
707
696
|
- lib/snippets/push-to-heroku
|
|
708
697
|
- lib/tasks/cron.rake
|
|
709
698
|
- lib/tasks/dev.rake
|
|
@@ -885,158 +874,158 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
885
874
|
version: '0'
|
|
886
875
|
requirements: []
|
|
887
876
|
rubyforge_project:
|
|
888
|
-
rubygems_version: 2.6
|
|
877
|
+
rubygems_version: 2.7.6
|
|
889
878
|
signing_key:
|
|
890
879
|
specification_version: 4
|
|
891
880
|
summary: Application deployment software
|
|
892
881
|
test_files:
|
|
893
|
-
- test/
|
|
894
|
-
- test/
|
|
895
|
-
- test/
|
|
896
|
-
- test/
|
|
897
|
-
- test/
|
|
898
|
-
- test/
|
|
899
|
-
- test/
|
|
900
|
-
- test/
|
|
901
|
-
- test/
|
|
902
|
-
- test/controllers/
|
|
903
|
-
- test/
|
|
904
|
-
- test/controllers/commit_checks_controller_test.rb
|
|
905
|
-
- test/controllers/commits_controller_test.rb
|
|
906
|
-
- test/controllers/deploys_controller_test.rb
|
|
907
|
-
- test/controllers/github_authentication_controller_test.rb
|
|
908
|
-
- test/controllers/pull_requests_controller_test.rb
|
|
909
|
-
- test/controllers/rollbacks_controller_test.rb
|
|
910
|
-
- test/controllers/stacks_controller_test.rb
|
|
911
|
-
- test/controllers/status_controller_test.rb
|
|
912
|
-
- test/controllers/tasks_controller_test.rb
|
|
913
|
-
- test/controllers/webhooks_controller_test.rb
|
|
882
|
+
- test/unit/environment_variables_test.rb
|
|
883
|
+
- test/unit/shipit_test.rb
|
|
884
|
+
- test/unit/command_test.rb
|
|
885
|
+
- test/unit/commands_test.rb
|
|
886
|
+
- test/unit/deploy_commands_test.rb
|
|
887
|
+
- test/unit/github_url_helper_test.rb
|
|
888
|
+
- test/unit/variable_definition_test.rb
|
|
889
|
+
- test/unit/csv_serializer_test.rb
|
|
890
|
+
- test/test_command_integration.rb
|
|
891
|
+
- test/dummy/app/controllers/application_controller.rb
|
|
892
|
+
- test/dummy/app/views/layouts/application.html.erb
|
|
914
893
|
- test/dummy/app/assets/javascripts/application.js
|
|
915
894
|
- test/dummy/app/assets/stylesheets/application.css
|
|
916
|
-
- test/dummy/app/controllers/application_controller.rb
|
|
917
895
|
- test/dummy/app/helpers/application_helper.rb
|
|
918
|
-
- test/dummy/app/views/layouts/application.html.erb
|
|
919
|
-
- test/dummy/bin/bundle
|
|
920
|
-
- test/dummy/bin/rails
|
|
921
896
|
- test/dummy/bin/rake
|
|
922
897
|
- test/dummy/bin/setup
|
|
898
|
+
- test/dummy/bin/bundle
|
|
899
|
+
- test/dummy/bin/rails
|
|
900
|
+
- test/dummy/config/secrets.yml
|
|
901
|
+
- test/dummy/config/routes.rb
|
|
902
|
+
- test/dummy/config/locales/en.yml
|
|
903
|
+
- test/dummy/config/environments/production.rb
|
|
904
|
+
- test/dummy/config/environments/development.rb
|
|
905
|
+
- test/dummy/config/environments/test.rb
|
|
906
|
+
- test/dummy/config/database.postgresql.yml
|
|
907
|
+
- test/dummy/config/environment.rb
|
|
923
908
|
- test/dummy/config/application.rb
|
|
909
|
+
- test/dummy/config/database.yml
|
|
924
910
|
- test/dummy/config/boot.rb
|
|
925
911
|
- test/dummy/config/database.mysql.yml
|
|
926
|
-
- test/dummy/config/database.postgresql.yml
|
|
927
|
-
- test/dummy/config/database.yml
|
|
928
|
-
- test/dummy/config/environment.rb
|
|
929
|
-
- test/dummy/config/environments/development.rb
|
|
930
|
-
- test/dummy/config/environments/production.rb
|
|
931
|
-
- test/dummy/config/environments/test.rb
|
|
932
|
-
- test/dummy/config/initializers/0_load_development_secrets.rb
|
|
933
|
-
- test/dummy/config/initializers/assets.rb
|
|
934
912
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
|
935
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
|
936
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
|
937
|
-
- test/dummy/config/initializers/inflections.rb
|
|
938
913
|
- test/dummy/config/initializers/mime_types.rb
|
|
914
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
|
939
915
|
- test/dummy/config/initializers/session_store.rb
|
|
940
916
|
- test/dummy/config/initializers/wrap_parameters.rb
|
|
941
|
-
- test/dummy/config/
|
|
942
|
-
- test/dummy/config/
|
|
943
|
-
- test/dummy/config/
|
|
917
|
+
- test/dummy/config/initializers/assets.rb
|
|
918
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
|
919
|
+
- test/dummy/config/initializers/0_load_development_secrets.rb
|
|
920
|
+
- test/dummy/config/initializers/inflections.rb
|
|
944
921
|
- test/dummy/config.ru
|
|
945
|
-
- test/dummy/
|
|
922
|
+
- test/dummy/Rakefile
|
|
923
|
+
- test/dummy/public/favicon.ico
|
|
924
|
+
- test/dummy/public/422.html
|
|
925
|
+
- test/dummy/public/500.html
|
|
926
|
+
- test/dummy/public/404.html
|
|
927
|
+
- test/dummy/db/schema.rb
|
|
928
|
+
- test/dummy/db/seeds.rb
|
|
929
|
+
- test/dummy/db/test.sqlite3
|
|
930
|
+
- test/dummy/db/development.sqlite3
|
|
931
|
+
- test/dummy/data/stacks/shopify/junk/production/git/README.md
|
|
932
|
+
- test/dummy/data/stacks/shopify/junk/production/git/shipit.yml
|
|
933
|
+
- test/dummy/data/stacks/shopify/junk/production/git/circle.yml
|
|
934
|
+
- test/dummy/data/stacks/byroot/junk/production/git/sd
|
|
935
|
+
- test/dummy/data/stacks/byroot/junk/production/git/sdkfjsdf
|
|
936
|
+
- test/dummy/data/stacks/byroot/junk/production/git/dskjfsd
|
|
946
937
|
- test/dummy/data/stacks/byroot/junk/production/git/bin/slow
|
|
947
938
|
- test/dummy/data/stacks/byroot/junk/production/git/bin/timeout
|
|
948
|
-
- test/dummy/data/stacks/byroot/junk/production/git/dkfdsf
|
|
949
|
-
- test/dummy/data/stacks/byroot/junk/production/git/dskjfsd
|
|
950
939
|
- test/dummy/data/stacks/byroot/junk/production/git/dslkjfjsdf
|
|
951
940
|
- test/dummy/data/stacks/byroot/junk/production/git/plopfizz
|
|
952
|
-
- test/dummy/data/stacks/byroot/junk/production/git/
|
|
953
|
-
- test/dummy/data/stacks/byroot/junk/production/git/
|
|
941
|
+
- test/dummy/data/stacks/byroot/junk/production/git/toto.txt
|
|
942
|
+
- test/dummy/data/stacks/byroot/junk/production/git/shipit.yml
|
|
943
|
+
- test/dummy/data/stacks/byroot/junk/production/git/bar.txt
|
|
944
|
+
- test/dummy/data/stacks/byroot/junk/production/git/dkfdsf
|
|
954
945
|
- test/dummy/data/stacks/byroot/junk/production/git/sdlfjsdfdsfj
|
|
955
946
|
- test/dummy/data/stacks/byroot/junk/production/git/sdlkfjsdlkfjsdlkfjdsfsdfksdfjsldkfjsdlkfjsdf
|
|
956
|
-
- test/
|
|
957
|
-
- test/
|
|
958
|
-
- test/
|
|
959
|
-
- test/
|
|
960
|
-
- test/
|
|
961
|
-
- test/
|
|
962
|
-
- test/
|
|
963
|
-
- test/
|
|
964
|
-
- test/
|
|
965
|
-
- test/
|
|
966
|
-
- test/
|
|
967
|
-
- test/
|
|
968
|
-
- test/
|
|
969
|
-
- test/
|
|
947
|
+
- test/models/rollbacks_test.rb
|
|
948
|
+
- test/models/github_hook_test.rb
|
|
949
|
+
- test/models/team_test.rb
|
|
950
|
+
- test/models/membership_test.rb
|
|
951
|
+
- test/models/commit_deployment_test.rb
|
|
952
|
+
- test/models/commit_checks_test.rb
|
|
953
|
+
- test/models/stacks_test.rb
|
|
954
|
+
- test/models/delivery_test.rb
|
|
955
|
+
- test/models/commit_deployment_status_test.rb
|
|
956
|
+
- test/models/api_client_test.rb
|
|
957
|
+
- test/models/hook_test.rb
|
|
958
|
+
- test/models/task_definitions_test.rb
|
|
959
|
+
- test/models/status/group_test.rb
|
|
960
|
+
- test/models/status/missing_test.rb
|
|
961
|
+
- test/models/deploy_spec_test.rb
|
|
962
|
+
- test/models/status_test.rb
|
|
963
|
+
- test/models/output_chunk_test.rb
|
|
964
|
+
- test/models/deploys_test.rb
|
|
965
|
+
- test/models/pull_request_test.rb
|
|
966
|
+
- test/models/undeployed_commits_test.rb
|
|
967
|
+
- test/models/duration_test.rb
|
|
968
|
+
- test/models/users_test.rb
|
|
969
|
+
- test/models/commits_test.rb
|
|
970
970
|
- test/fixtures/payloads/push_master.json
|
|
971
|
-
- test/fixtures/payloads/push_not_master.json
|
|
972
971
|
- test/fixtures/payloads/status_master.json
|
|
973
|
-
- test/fixtures/
|
|
972
|
+
- test/fixtures/payloads/push_not_master.json
|
|
973
|
+
- test/fixtures/timeout
|
|
974
|
+
- test/fixtures/shipit/pull_requests.yml
|
|
975
|
+
- test/fixtures/shipit/teams.yml
|
|
976
|
+
- test/fixtures/shipit/github_hooks.yml
|
|
977
|
+
- test/fixtures/shipit/users.yml
|
|
974
978
|
- test/fixtures/shipit/commit_deployment_statuses.yml
|
|
975
|
-
- test/fixtures/shipit/commit_deployments.yml
|
|
976
979
|
- test/fixtures/shipit/commits.yml
|
|
980
|
+
- test/fixtures/shipit/output_chunks.yml
|
|
981
|
+
- test/fixtures/shipit/tasks.yml
|
|
977
982
|
- test/fixtures/shipit/deliveries.yml
|
|
978
|
-
- test/fixtures/shipit/
|
|
983
|
+
- test/fixtures/shipit/commit_deployments.yml
|
|
979
984
|
- test/fixtures/shipit/hooks.yml
|
|
980
|
-
- test/fixtures/shipit/memberships.yml
|
|
981
|
-
- test/fixtures/shipit/output_chunks.yml
|
|
982
|
-
- test/fixtures/shipit/pull_requests.yml
|
|
983
985
|
- test/fixtures/shipit/stacks.yml
|
|
986
|
+
- test/fixtures/shipit/api_clients.yml
|
|
984
987
|
- test/fixtures/shipit/statuses.yml
|
|
985
|
-
- test/fixtures/shipit/
|
|
986
|
-
- test/
|
|
987
|
-
- test/
|
|
988
|
-
- test/
|
|
989
|
-
- test/
|
|
990
|
-
- test/
|
|
991
|
-
- test/
|
|
992
|
-
- test/helpers/json_helper.rb
|
|
993
|
-
- test/helpers/links_helper.rb
|
|
994
|
-
- test/helpers/payloads_helper.rb
|
|
995
|
-
- test/helpers/queries_helper.rb
|
|
988
|
+
- test/fixtures/shipit/memberships.yml
|
|
989
|
+
- test/test_helper.rb
|
|
990
|
+
- test/jobs/perform_task_job_test.rb
|
|
991
|
+
- test/jobs/fetch_deployed_revision_job_test.rb
|
|
992
|
+
- test/jobs/refresh_status_job_test.rb
|
|
993
|
+
- test/jobs/unique_job_test.rb
|
|
994
|
+
- test/jobs/purge_old_deliveries_job_test.rb
|
|
996
995
|
- test/jobs/cache_deploy_spec_job_test.rb
|
|
997
|
-
- test/jobs/chunk_rollup_job_test.rb
|
|
998
996
|
- test/jobs/deliver_hook_job_test.rb
|
|
997
|
+
- test/jobs/fetch_commit_stats_job_test.rb
|
|
999
998
|
- test/jobs/destroy_stack_job_test.rb
|
|
1000
999
|
- test/jobs/emit_event_job_test.rb
|
|
1001
|
-
- test/jobs/fetch_commit_stats_job_test.rb
|
|
1002
|
-
- test/jobs/fetch_deployed_revision_job_test.rb
|
|
1003
|
-
- test/jobs/github_sync_job_test.rb
|
|
1004
1000
|
- test/jobs/merge_pull_requests_job_test.rb
|
|
1005
|
-
- test/jobs/perform_task_job_test.rb
|
|
1006
|
-
- test/jobs/purge_old_deliveries_job_test.rb
|
|
1007
1001
|
- test/jobs/refresh_github_user_job_test.rb
|
|
1008
|
-
- test/jobs/
|
|
1009
|
-
- test/jobs/
|
|
1010
|
-
- test/
|
|
1011
|
-
- test/
|
|
1012
|
-
- test/
|
|
1013
|
-
- test/
|
|
1014
|
-
- test/
|
|
1015
|
-
- test/
|
|
1016
|
-
- test/
|
|
1017
|
-
- test/
|
|
1018
|
-
- test/
|
|
1019
|
-
- test/
|
|
1020
|
-
- test/
|
|
1021
|
-
- test/
|
|
1022
|
-
- test/
|
|
1023
|
-
- test/
|
|
1024
|
-
- test/
|
|
1025
|
-
- test/
|
|
1026
|
-
- test/
|
|
1027
|
-
- test/
|
|
1028
|
-
- test/
|
|
1029
|
-
- test/
|
|
1030
|
-
- test/
|
|
1031
|
-
- test/
|
|
1032
|
-
- test/
|
|
1033
|
-
- test/
|
|
1034
|
-
- test/
|
|
1035
|
-
- test/
|
|
1036
|
-
- test/
|
|
1037
|
-
- test/
|
|
1038
|
-
- test/unit/deploy_commands_test.rb
|
|
1039
|
-
- test/unit/environment_variables_test.rb
|
|
1040
|
-
- test/unit/github_url_helper_test.rb
|
|
1041
|
-
- test/unit/shipit_test.rb
|
|
1042
|
-
- test/unit/variable_definition_test.rb
|
|
1002
|
+
- test/jobs/chunk_rollup_job_test.rb
|
|
1003
|
+
- test/jobs/github_sync_job_test.rb
|
|
1004
|
+
- test/controllers/rollbacks_controller_test.rb
|
|
1005
|
+
- test/controllers/tasks_controller_test.rb
|
|
1006
|
+
- test/controllers/stacks_controller_test.rb
|
|
1007
|
+
- test/controllers/commits_controller_test.rb
|
|
1008
|
+
- test/controllers/github_authentication_controller_test.rb
|
|
1009
|
+
- test/controllers/ccmenu_controller_test.rb
|
|
1010
|
+
- test/controllers/commit_checks_controller_test.rb
|
|
1011
|
+
- test/controllers/pull_requests_controller_test.rb
|
|
1012
|
+
- test/controllers/api/outputs_controller_test.rb
|
|
1013
|
+
- test/controllers/api/hooks_controller_test.rb
|
|
1014
|
+
- test/controllers/api/tasks_controller_test.rb
|
|
1015
|
+
- test/controllers/api/stacks_controller_test.rb
|
|
1016
|
+
- test/controllers/api/commits_controller_test.rb
|
|
1017
|
+
- test/controllers/api/ccmenu_controller_test.rb
|
|
1018
|
+
- test/controllers/api/pull_requests_controller_test.rb
|
|
1019
|
+
- test/controllers/api/base_controller_test.rb
|
|
1020
|
+
- test/controllers/api/locks_controller_test.rb
|
|
1021
|
+
- test/controllers/api/deploys_controller_test.rb
|
|
1022
|
+
- test/controllers/webhooks_controller_test.rb
|
|
1023
|
+
- test/controllers/status_controller_test.rb
|
|
1024
|
+
- test/controllers/deploys_controller_test.rb
|
|
1025
|
+
- test/helpers/json_helper.rb
|
|
1026
|
+
- test/helpers/payloads_helper.rb
|
|
1027
|
+
- test/helpers/links_helper.rb
|
|
1028
|
+
- test/helpers/queries_helper.rb
|
|
1029
|
+
- test/helpers/fixture_aliases_helper.rb
|
|
1030
|
+
- test/helpers/api_helper.rb
|
|
1031
|
+
- test/helpers/hooks_helper.rb
|