Lin Jen-Shin
4efc1c4a68
Rename according to:
...
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12563922
For clarification and consistency
2016-06-20 16:52:05 +08:00
Lin Jen-Shin
4852acef92
Use FIXME instead, feedback from:
...
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093/diffs#note_12501400
2016-06-16 23:20:13 +08:00
Lin Jen-Shin
9cf45b0586
Return the association and check it in controller instead:
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4641#note_12444891
2016-06-14 23:11:43 +08:00
Lin Jen-Shin
6c500034f4
Merge branch 'prefer-assign_to' into feature/runner-lock-on-project
...
* prefer-assign_to:
Give 409 Conflict whenever the runner was already enabled
We're checking return value rather than rescuing exceptions
Prefer Runner#assign_to instead of creating directly
2016-06-14 23:05:33 +08:00
Lin Jen-Shin
f74f423860
Give 409 Conflict whenever the runner was already enabled
2016-06-14 22:25:11 +08:00
Lin Jen-Shin
1b03c5807f
We're checking return value rather than rescuing exceptions
2016-06-14 17:28:11 +08:00
Lin Jen-Shin
cbd6ca6985
Rename specific_for to available_for:
...
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12413950
2016-06-14 16:07:57 +08:00
Lin Jen-Shin
8b34687a36
Merge conditions. Not worth an additional pointless method:
...
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12321267
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
d7b08024af
Renamed to available_for? Feedback from:
...
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12321240
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
268f7713a9
Remove Build#can_be_served? and rename Runner#can_serve? to can_pick?
...
This also moves tests from build_spec.rb to runner_spec.rb
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
5bd077bd41
Manually build the SQL so that it properly skips Rails.
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
fc51bf3248
Found a workaround for that weird SQL error:
...
Without that, Rails would complain:
> bind message supplies 5 parameters, but prepared statement "a4" requires 4
However without this workaround it would still work in Rails console,
so I still think this is a Rails bug somewhere.
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
1c302d566b
WIP, try to add views for locked runners
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
0eeb4bed49
Introduced Ci::Runner.specific_for for getting specific runners:
...
for a particular project.
2016-06-09 16:00:24 +08:00
Lin Jen-Shin
4f7f3258c1
Implement the logic for locking runner
2016-06-09 16:00:24 +08: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
Grzegorz Bizon
c3c503d259
Rename method that validates runner tag constrains
2016-05-19 22:01:53 +02:00
Grzegorz Bizon
f6dd8a5257
Move runner validator to separate private method
2016-05-19 22:01:53 +02:00
Grzegorz Bizon
9fd6f1b600
Improve displaying validation messages for runner
2016-05-19 22:01:53 +02:00
Grzegorz Bizon
dd8e9e2d7a
Add custom validator to runner model
2016-05-19 22:01:53 +02:00
Grzegorz Bizon
2aa5707194
Extend runner config options for untagged jobs
2016-05-19 22:01:53 +02:00
Rémy Coutable
66824e09e2
Merge branch 'fix/reuse-runner-edit-form-in-admin-area' into 'master'
...
Reuse runners edit form in admin and project area
Reuse runners edit form in admin and project area.

See merge request !4094
2016-05-12 15:25:56 +00:00
Grzegorz Bizon
a2934f4531
Use % notation for arrays in runner model constants
2016-05-11 12:39:07 +02:00
Grzegorz Bizon
7d6d3421d6
Share form editable attributes mf runner via model
2016-05-10 14:21:01 +02:00
Jeroen van Baarsen
f1479b56b7
Remove the annotate gem and delete old annotations
...
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.
Fixes : #17382
2016-05-09 18:00:28 +02:00
Zeger-Jan van de Weg
47da013cf8
Annotate the models
2016-05-06 08:27:46 +02:00
Yorick Peterse and Robert Speicher
d7d5937531
Removed arel_table receiver from search methods
...
We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
2016-03-11 15:25:23 -05:00
Yorick Peterse and Robert Speicher
2076bdb62e
Use ILIKE/LIKE for searching CI runners
2016-03-11 15:25:21 -05:00
Tomasz Maczukin
2ef196deb2
Change interpolation to named placeholder in owned_or_shared scope
2016-02-19 13:18:48 +01:00
Tomasz Maczukin
128be3c010
Add basic runners management API
...
- add feature to list runners
- add feature to show runners details
- add feature to delete runner
- add feature to update runner
2016-02-19 13:18:46 +01:00
Kamil Trzcinski
64bfd9d71a
Remove ci_ prefix from all ci related things
2015-12-11 18:02:09 +01:00
Kamil Trzcinski
e80e3f5372
Migrate CI::Project to Project
2015-12-11 18:02:09 +01:00
Dmitriy Zaporozhets
a237999f00
Annotate models
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-11-13 19:22:46 +01:00
Kamil Trzcinski
6db014987d
Fix specific runner visibility
2015-10-26 11:23:11 +01:00
Kamil Trzciński
daccc54d25
Merge branch 'builds-view' into 'master'
...
Added builds view

/cc @dzaporozhets @vsizov
See merge request !1593
2015-10-15 11:35:57 +00:00
Kamil Trzcinski
d9ece71ef0
Fix specs
2015-10-14 17:38:26 +02:00
Kamil Trzcinski
7af4f5215e
Show warning if build doesn't have runners with specified tags or runners didn't connect recently
...
Slightly refactor runner status detection: moving it to Runner class
Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu >
2015-10-14 17:29:18 +02:00
Kamil Trzcinski
a957eca6f3
Added builds view
2015-10-14 17:28:38 +02:00
Kamil Trzcinski
2c1f7ccac8
Fix register_build_service tests
2015-09-29 10:47:03 +02:00
Kamil Trzcinski
fe42de3a48
Fix: features/ci/admin/runners_spec.rb
2015-09-15 22:15:28 +02:00
Douwe Maan
046b283127
Groundwork for merging CI into CE
2015-08-25 18:42:46 -07:00