Commit graph

10 commits

Author SHA1 Message Date
Lin Jen-Shin
f3e8b88814 Use travel_to instead of dependency injection, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5734#note_14056642
2016-08-19 16:57:25 +08:00
Lin Jen-Shin
ce64133516 Introduce Gitlab::Utils.now so that it's easier to stub 2016-08-15 21:32:36 +08:00
Lin Jen-Shin
b5d1e6341b Merge branch 'pipeline-hooks-without-slack' into wall-clock-time-for-showing-pipeline
* pipeline-hooks-without-slack: (156 commits)
  Fix test failures
  Make pipeline to be in created state for hooks tests
  Make `execute_methods` public
  Added specs for started_at and finished_at
  Use explicit events to transition between states
  Fix tests. We cannot reload unless it's already saved:
  Have trait all_events_enabled so that's easier to reuse, feedback:
  Simplify the name for data builder, feedback:
  Prefer extend self over module_function, feedback:
  Make it more grammatically correct, feedback:
  if -> when; when -> `when`; %w() -> %w[]; and fix some typos:
  Prefer described_class, feedback:
  Make the comment more clear, feedback:
  Update CHANGELOG
  render only commit title
  Fix test failures, that did occur because of missing previously used `reload_status!` call
  Use state machine for pipeline event processing
  Upgrade Rails to 4.2.7.1 for security fixes.
  Update gitlab-shell to v3.3.3
  Verify the pipeline status after executing events on builds
  ...
2016-08-15 18:45:45 +08:00
Kamil Trzcinski
39203f1adf Pre-create all builds for Pipeline when a trigger is received
This change simplifies a Pipeline processing by introducing a special new status: created.
This status is used for all builds that are created for a pipeline.
We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped).
This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled.
This also allows us to visualise a full pipeline (with created builds).

This also removes an after_touch used for updating a pipeline state parameters.
Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
2016-08-11 15:22:35 +02:00
Lin Jen-Shin
21fdc1edae Cleanup the use of duration and optimize some queries 2016-08-10 23:12:02 +08:00
Kamil Trzcinski
640924e4a2 Mark builds with manual actions as skipped 2016-07-18 14:48:36 +02:00
Grzegorz Bizon
bdb86ea6cf Render canceled status if any of the jobs canceled
This status will be returned only when there are no failed jobs
that are not allowed to fail.
2016-04-27 14:16:01 +02:00
Kamil Trzcinski
433ca7390d Make some logic less twistable 2016-04-17 09:32:49 -04:00
Kamil Trzcinski
1c5b172abb Write specs for this feature 2016-04-16 22:43:40 +02:00
Kamil Trzcinski
0b1655e7b2 Rename CiStatus to Statusable 2016-04-16 21:46:26 +02:00
Renamed from app/models/concerns/ci_status.rb (Browse further)