Commit Graph

30 Commits

Author SHA1 Message Date
Z.J. van de Weg 55365d368a Only create refs for new deployments
This patch makes sure GitLab does not save the refs to the filesystem
each time the deployment is updated. This will save some IO although I
expect the impact to be minimal.
2016-10-20 14:21:40 +02:00
Z.J. van de Weg c1212beaa4 Use deployment IID when saving refs 2016-10-20 14:17:22 +02:00
Kamil Trzcinski 9b790f1cf9 Improve after code review 2016-10-17 16:13:19 +02:00
Kamil Trzcinski 18bb0a5696 Add on_stop column [ci skip] 2016-10-17 15:34:30 +02:00
Kamil Trzcinski 6cdbb27ec3 Refactor code to use available and stopped statuses and refactor views to use separate renders 2016-10-17 12:45:31 +02:00
Kamil Trzcinski 40528a1326 Merge remote-tracking branch 'origin/master' into 22191-delete-dynamic-envs-mr 2016-10-17 11:24:51 +02:00
Z.J. van de Weg 35e2315a66 Minor style improvement 2016-10-14 11:07:50 +02:00
Sean McGivern 776cea4c00 Handle case where deployment ref no longer exists
Keep-around refs for deployments were only introduced in 8.10, so any
deployment created in 8.9 could have a SHA pointing to a commit that no
longer exists in the repository. We can't do anything useful with those
deployments, so make `#includes_commit?` always return false for those.
2016-10-13 16:15:38 +01:00
Kamil Trzcinski 3f85c3ef16 Initial support for closing environments 2016-10-06 13:16:34 +02:00
Z.J. van de Weg 901c994b7a deployment refs in own folder, new method for creating refs 2016-10-04 09:54:31 +02:00
Zeger-Jan van de Weg 8fd9179438 Update method name 2016-10-04 09:54:31 +02:00
Z.J. van de Weg 7d46bd6128 Save a fetchable ref per deployement 2016-10-04 09:54:31 +02:00
Timothy Andrew 918e589c2b Implement a second round of review comments from @DouweM.
- Don't use `TableReferences` - using `.arel_table` is shorter!
- Move some database-related code to `Gitlab::Database`
- Remove the `MergeRequest#issues_closed` and
  `Issue#closed_by_merge_requests`  associations. They were either
  shadowing or were too similar to existing methods. They are not being
  used anywhere, so it's better to remove them to reduce confusion.
- Use Rails 3-style validations
- Index for `MergeRequest::Metrics#first_deployed_to_production_at`
- Only include `CycleAnalyticsHelpers::TestGeneration` for specs that
  need it.
- Other minor refactorings.
2016-09-21 00:47:37 +05:30
Timothy Andrew 231a9f5b87 Fix rubocop spec.
And `scss_lint`
2016-09-20 18:26:31 +05:30
Timothy Andrew 71d4bf721b Implement (some) comments from @DouweM's review.
- Move things common to `Issue` and `MergeRequest` into `Issuable`
- Move more database-specific functions into `Gitlab::Database`
- Indentation changes and other minor refactorings.
2016-09-20 18:13:11 +05:30
Timothy Andrew 8957293d9b Implement review comments from @yorickpeterse
1. Change multiple updates to a single `update_all`

2. Use cascading deletes

3. Extract an average function for the database median.

4. Move database median to `lib/gitlab/database`

5. Use `delete_all` instead of `destroy_all`

6. Minor refactoring
2016-09-20 16:05:25 +05:30
Z.J. van de Weg 07fc2f852a Method names changed to #includes_commit? 2016-08-12 10:43:04 +02:00
Z.J. van de Weg b497b0ce3f Incorporate feedback 2016-08-11 21:29:57 +02:00
Z.J. van de Weg 49f72e705f Show deployment status on a MR view 2016-08-11 21:29:57 +02:00
Kamil Trzcinski e00da96c88 Improve manual actions code and add model, service and feature tests
Manual actions are accessible from:
- Pipelines
- Builds
- Environments
- Deployments
2016-07-18 14:46:20 +02:00
Kamil Trzcinski 3248c9fb56 Rename playable_actions to manual_actions 2016-07-18 14:44:21 +02:00
Kamil Trzcinski 7d0fe1f04e Add implementation of manual actions 2016-07-18 14:44:21 +02:00
Douwe Maan 8d7dc26d39 Support new diff notes on MRs with diff_refs 2016-07-06 18:51:00 -04:00
Kamil Trzcinski 6ace6d940a Use validate and required for environment and project 2016-06-15 15:09:50 +02:00
Kamil Trzcinski 9e487100b5 Validate project and environment instead of only requiring 2016-06-15 14:05:10 +02:00
Kamil Trzcinski 2541e50d7c Improve validations 2016-06-15 12:03:49 +02:00
Kamil Trzcinski 14a02a6a95 Improve design after review 2016-06-14 18:34:48 +02:00
Kamil Trzcinski 30877effb1 Test environment controller specs 2016-06-14 14:47:00 +02:00
Kamil Trzcinski 3ade826065 Add specs for models and services 2016-06-14 13:51:12 +02:00
Kamil Trzcinski 907c0e6796 Added initial version of deployments 2016-06-10 23:36:54 +02:00