Commit Graph

31 Commits

Author SHA1 Message Date
Lin Jen-Shin d5264e8804 Simplify the name for data builder, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
2016-08-12 16:09:29 +08:00
Kamil Trzcinski 0b0a53ee5e Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slack
# Conflicts:
#	app/models/ci/pipeline.rb
#	app/services/ci/create_pipeline_service.rb
#	spec/models/project_services/hipchat_service_spec.rb
2016-08-11 17:10:28 +02: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 984367f957 Move those builders to their own namespace, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13540099
2016-08-04 23:44:27 +08:00
Alejandro Rodríguez d00679d54f Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects 2016-07-28 12:24:47 -04:00
Alejandro Rodríguez 3dc8075af5 Revert "Merge branch '17073-tagscontroller-index-is-terrible-response-time-goes-up-to-5-…"
This reverts merge request !5375
2016-07-24 18:45:14 +00:00
Alejandro Rodríguez 065a65adfe Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects 2016-07-21 18:00:16 -04:00
Valery Sizov 3baed8cb6d Services: code style fixes, minor refactoring 2016-07-06 20:58:43 +03:00
Grzegorz Bizon a55e8f109f Enable Style/NegatedIf Rubocop cop
Favor `unless` over `if` for negative conditions
(or control flow ||).

See #17478
2016-05-30 13:53:25 +02:00
Stan Hu 525e05b653 Expire repository exists? and has_visible_content? caches after a push if necessary
Closes #17012
2016-05-04 11:59:12 -07:00
Gabriel Mazetto 5330af3fa6 Using single builder for push and tag events 2016-04-19 11:00:30 +02:00
Gabriel Mazetto 2384bed4d8 Refactor GitTagPushService and fig tags_push system event hook 2016-04-19 11:00:30 +02:00
Gabriel Mazetto ee1090e2b2 Added System Hooks for push and tag_push
Code is based on Project Webhooks, removing deprecations and without
commits listing.
2016-04-19 11:00:30 +02:00
Yorick Peterse cb5a5ba095 Cache & flush tag/branch counts
The methods used for this are Repository#tag_count and
Repository#branch_count which cache their output in Redis as well as
memoizing it in an instance variable. Both methods have a corresponding
methods/hooks to flush the caches at the right time.
2016-03-08 18:19:40 +01:00
Yorick Peterse ff28a7cc36 Moved cache expiration code to Repository hooks
This keeps all the cache expiration code in a single file/class instead
of spreading it all across the codebase.
2016-02-23 12:02:59 +01:00
Kamil Trzcinski 64bfd9d71a Remove ci_ prefix from all ci related things 2015-12-11 18:02:09 +01:00
Dmitriy Zaporozhets 67ca5a53f6
Build missing cache items in background job after each push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 14:50:03 +02:00
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Kamil Trzcinski 5b432e7671 Extend push_tag event to include tag message and last commit 2015-03-21 11:25:27 +01:00
Douwe Maan f2024b1e06 More consistent method naming. 2015-03-13 16:07:02 +01:00
Douwe Maan 4e49f21b14 Set push data object kind in PushDataBuilder. 2015-03-13 14:51:48 +01:00
Douwe Maan 5c910b94ce Set correct object_kind on tag push data. 2015-03-03 11:14:33 +01:00
Douwe Maan ca56d9ff9f Don't execute GitlabCiService twice for pushed tags. 2015-03-03 11:14:32 +01:00
Douwe Maan 19f04cf989 Execute services for tag push. 2015-03-03 11:14:32 +01:00
Douwe Maan 07d05d2df7 Move all event creation to EventCreateService. 2015-02-13 12:02:58 +01:00
Dmitriy Zaporozhets 3197044512 Refactor push data builder. Moved it to separate class
Also execute GitLab CI on creating tag via UI
2015-01-11 23:51:31 -08:00
Dmitriy Zaporozhets 2543af84f0 Execute GitLab CI on tag push 2015-01-10 22:18:14 -08:00
Dmitriy Zaporozhets 5be424565e
Create event and clear cache on new trag push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-13 11:37:13 +02:00
Jeroen van Baarsen e6ceec9d60 Renamed oldrev/newrev to before/after 2014-03-06 16:15:19 +01:00
Jeroen van Baarsen 4a251849cf Added newrev and oldrev to the hook data 2014-03-06 16:08:51 +01:00
Jeroen van Baarsen 13d2bcc3b4 Created a basic Git Tag Push service
This is the first version, and only has the most basic information about
the tag that is created.
2014-03-05 21:23:49 +01:00