shipit-engine 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -37
  3. data/app/assets/javascripts/task/tty.js.coffee +40 -22
  4. data/app/assets/stylesheets/_pages/_deploy.scss +1 -0
  5. data/app/controllers/shipit/api/locks_controller.rb +3 -3
  6. data/app/controllers/shipit/api/stacks_controller.rb +14 -1
  7. data/app/controllers/shipit/commit_checks_controller.rb +9 -2
  8. data/app/controllers/shipit/shipit_controller.rb +1 -1
  9. data/app/controllers/shipit/stacks_controller.rb +11 -5
  10. data/app/controllers/shipit/status_controller.rb +1 -1
  11. data/app/controllers/shipit/webhooks_controller.rb +15 -5
  12. data/app/helpers/shipit/deploys_helper.rb +1 -1
  13. data/app/helpers/shipit/shipit_helper.rb +2 -0
  14. data/app/jobs/shipit/perform_commit_checks_job.rb +2 -0
  15. data/app/jobs/shipit/perform_task_job.rb +18 -8
  16. data/app/models/shipit/commit.rb +22 -12
  17. data/app/models/shipit/commit_checks.rb +20 -53
  18. data/app/models/shipit/deploy.rb +1 -1
  19. data/app/models/shipit/ephemeral_commit_checks.rb +76 -0
  20. data/app/models/shipit/stack.rb +40 -10
  21. data/app/models/shipit/status.rb +14 -8
  22. data/app/models/shipit/status_group.rb +1 -1
  23. data/app/models/shipit/task.rb +2 -0
  24. data/app/models/shipit/unknown_status.rb +4 -0
  25. data/app/models/shipit/user.rb +9 -1
  26. data/app/serializers/shipit/stack_serializer.rb +6 -1
  27. data/app/views/shipit/commit_checks/_checks.html.erb +13 -0
  28. data/app/views/shipit/commit_checks/show.html.erb +5 -0
  29. data/app/views/shipit/stacks/_header.html.erb +1 -1
  30. data/app/views/shipit/stacks/show.html.erb +15 -0
  31. data/config/routes.rb +2 -1
  32. data/db/migrate/20140226233935_create_baseline.rb +10 -10
  33. data/db/migrate/20160802092812_add_continuous_delivery_delayed_since_to_stacks.rb +5 -0
  34. data/db/migrate/20160822131405_add_locked_since_to_stacks.rb +5 -0
  35. data/lib/shipit.rb +4 -0
  36. data/lib/shipit/command.rb +1 -1
  37. data/lib/shipit/commands.rb +10 -7
  38. data/lib/shipit/csv_serializer.rb +1 -1
  39. data/lib/shipit/stack_commands.rb +17 -5
  40. data/lib/shipit/task_commands.rb +2 -2
  41. data/lib/shipit/version.rb +1 -1
  42. data/lib/snippets/push-to-heroku +20 -16
  43. data/test/controllers/api/deploys_controller_test.rb +8 -8
  44. data/test/controllers/api/hooks_controller_test.rb +11 -9
  45. data/test/controllers/api/locks_controller_test.rb +16 -6
  46. data/test/controllers/api/outputs_controller_test.rb +1 -1
  47. data/test/controllers/api/stacks_controller_test.rb +48 -3
  48. data/test/controllers/api/tasks_controller_test.rb +6 -6
  49. data/test/controllers/commit_checks_controller_test.rb +3 -3
  50. data/test/controllers/deploys_controller_test.rb +13 -13
  51. data/test/controllers/rollbacks_controller_test.rb +7 -7
  52. data/test/controllers/stacks_controller_test.rb +36 -29
  53. data/test/controllers/tasks_controller_test.rb +14 -14
  54. data/test/controllers/webhooks_controller_test.rb +16 -25
  55. data/test/dummy/config/application.rb +0 -3
  56. data/test/dummy/config/environments/test.rb +2 -2
  57. data/test/dummy/data/stacks/byroot/junk/production/git/bar.txt +2 -0
  58. data/test/dummy/data/stacks/byroot/junk/production/git/bin/slow +7 -0
  59. data/test/dummy/data/stacks/byroot/junk/production/git/bin/timeout +10 -0
  60. data/test/dummy/data/stacks/byroot/junk/production/git/dkfdsf +0 -0
  61. data/test/dummy/data/stacks/byroot/junk/production/git/dskjfsd +0 -0
  62. data/test/dummy/data/stacks/byroot/junk/production/git/dslkjfjsdf +0 -0
  63. data/test/dummy/data/stacks/byroot/junk/production/git/plopfizz +0 -0
  64. data/test/dummy/data/stacks/byroot/junk/production/git/sd +0 -0
  65. data/test/dummy/data/stacks/byroot/junk/production/git/sdkfjsdf +1 -0
  66. data/test/dummy/data/stacks/byroot/junk/production/git/sdlfjsdfdsfj +0 -0
  67. data/test/dummy/data/stacks/byroot/junk/production/git/sdlkfjsdlkfjsdlkfjdsfsdfksdfjsldkfjsdlkfjsdf +0 -0
  68. data/test/dummy/data/stacks/byroot/junk/production/git/shipit.yml +21 -0
  69. data/test/dummy/data/stacks/byroot/junk/production/git/toto.txt +2 -0
  70. data/test/dummy/db/development.sqlite3 +0 -0
  71. data/test/dummy/db/schema.rb +15 -13
  72. data/test/dummy/db/test.sqlite3 +0 -0
  73. data/test/fixtures/shipit/commit_deployments.yml +8 -8
  74. data/test/fixtures/shipit/output_chunks.yml +12 -12
  75. data/test/fixtures/shipit/tasks.yml +9 -1
  76. data/test/fixtures/shipit/users.yml +9 -2
  77. data/test/jobs/perform_task_job_test.rb +14 -11
  78. data/test/models/commits_test.rb +33 -14
  79. data/test/models/stacks_test.rb +78 -4
  80. data/test/models/users_test.rb +16 -0
  81. data/test/unit/commands_test.rb +4 -0
  82. data/test/unit/deploy_commands_test.rb +1 -1
  83. metadata +133 -34
  84. data/app/jobs/shipit/git_mirror_update_job.rb +0 -14
  85. data/app/views/shipit/deploys/_checks.html.erb +0 -11
@@ -1,14 +0,0 @@
1
- module Shipit
2
- class GitMirrorUpdateJob < BackgroundJob
3
- queue_as :default
4
-
5
- def perform(stack)
6
- return if stack.inaccessible?
7
-
8
- commands = StackCommands.new(stack)
9
- stack.acquire_git_cache_lock do
10
- commands.fetch.run
11
- end
12
- end
13
- end
14
- end
@@ -1,11 +0,0 @@
1
- <%= javascript_include_tag 'task' %>
2
-
3
- <section>
4
- <header class="section-header">
5
- <h2>Checks</h2>
6
- </header>
7
-
8
- <%- output = commit.checks.output -%>
9
- <%- url = stack_tail_commit_checks_path(commit.stack, sha: commit.sha, since: output.bytesize) unless commit.checks.finished? -%>
10
- <pre class="commit-checks" data-status="<%= commit.checks.status %>"><code data-next-chunks-url="<%= url %>"><%= output %></code></pre>
11
- </section>