Commit Graph

46 Commits

Author SHA1 Message Date
Krasimir Angelov d745ff0431 Add username to deploy tokens
This new attribute is optional and used when set instead of the default
format `gitlab+deploy-token-#{id}`.

Empty usernames will be saved as null in the database.

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/50228.
2019-07-02 18:56:48 +00:00
Fabio Pitino 3ac527b488 Expose ci_default_git_depth via project API
Enable Get and Update of ci_default_git_depth for
Project API.

Renaming Project#default_git_depth to :ci_default_git_depth
to give more context through the API usage.

Add API documentation
2019-06-12 09:51:45 +01:00
Krasimir Angelov ad9ae16d8a Add project level git depth setting
Introduce default_git_depth in project's CI/CD settings and set it to
50. Use it if there is no GIT_DEPTH variable specified. Apply this
default only to newly created projects and keep it nil for old ones
in order to not break pipelines that rely on non-shallow clones.

default_git_depth can be updated from CI/CD Settings in the UI, must be
either nil or integer between 0 and 1000 (incl).

Inherit default_git_depth from the origin project when forking projects.

MR pipelines are run on a MR ref (refs/merge-requests/:iid/merge) and it
contains unique commit (i.e. merge commit) which doesn't exist in the
other branch/tags refs. We need to add it cause otherwise it may break
pipelines for old projects that have already enabled Pipelines for merge
results and have git depth 0.

Document new default_git_depth project CI/CD setting
2019-06-06 09:21:18 +01:00
Thong Kuah 851321f725 Ignore ProjectAutoDevops domain column
This column is no longer used. The form was removed in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24580
and other usages removed in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28460.

Remove final usages of :domain
2019-05-31 13:26:59 +12:00
Reuben Pereira 4376167a04 Add ProjectMetricsDashboardSetting model and table
This new table will be used to store the external_dashboard_url which
allows users to add a link to their external dashboards (ex Grafana)
to the Metrics dashboard.
2019-04-26 17:23:26 +00:00
Grzegorz Bizon 674e5e5baa Merge branch '57171-operations-controller-spec-refactor' into 'master'
Refactor operations controller spec

Closes #57171

See merge request gitlab-org/gitlab-ce!27558
2019-04-26 11:50:39 +00:00
rpereira2 e7e9929e0d Fix a bug in shared_examples definition 2019-04-25 16:06:17 +05:30
Matija Čupić 163730f0a2
Redirect to settings page on invalid update 2019-04-24 15:44:12 +02:00
rpereira2 9f9bb16cdf Move shared context to top of spec file
- Rename the shared_context
- Use expect in stub_operations_update_service_returning.
2019-04-24 12:01:29 +05:30
rpereira2 113c7af4c2 Refactor operations controller spec
- Move specs into a shared_context so that they can be reused.
- Move common specs out of a more specific context.
2019-04-22 23:58:27 +05:30
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Reuben Pereira 43e713eb41 Refactor model and spec
- Move some specs into contexts
- Let get_slugs method take a parameter and return a specific slug.
- Add rescues when using Addressable::URI.
2019-03-01 14:51:54 +00:00
Peter Leitzen 77eff52afa
Remove `error_tracking` feature flag
We introduced the feature flag `error_tracking` to test the Sentry MVC
safely.

After the successful test, we remove it again.
2019-01-15 21:33:40 +01:00
Peter Leitzen 6710c87434
Implement error tracking configuration
Re-use operations controller which already handles tracing settings.
2019-01-07 19:46:34 +01:00
Peter Leitzen b78ac977ee
Move settings operations controller from EE to CE
This commit prepares the structure for the upcoming feature error
tracking.
2019-01-06 15:13:14 +01:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Nick Thomas e8a675d35f
Remove the project_cleanup feature flag 2018-12-15 13:50:59 +00:00
Dylan Griffith f31429c1f6 Remove Sidekiq::Testing in RepositoryController spec 2018-12-07 13:12:35 +01:00
Nick Thomas 9395d198f9
Use BFG object maps to clean projects 2018-12-06 18:58:00 +00:00
Tomasz Maczukin 42af229510
Simplify runner registration token resetting
This icommit adds several changes related to the same topic
- resetting a Runner registration token:

1. On Project settings page it adds a button for resetting the
   registration token and it removes the Runner token field
   that was confusing all GitLab users.

2. On Group settings page it adds the same button for resetting
   the registration token.

3. On Admin Runners settings page it moves the button to the same
   place as in Project and Group settings and it changes slightly
   the page layout to make it more similar to Group and Project
   setting pages.

4. It refactorizes a little the partial that prints runner
   registration description. Thanks to this Project, Group
   and Admin settings of the Runner are re-using the same
   code to generate the button.

5. Updates the translations of changed text.
2018-10-04 08:37:01 +02:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Kamil Trzciński 051f385e7e Refactor validations and make runner factory by default to be instance-wide runner 2018-05-31 10:56:07 +02:00
Dylan Griffith 846f73b53b Allow group runners to be viewed/edited in API 2018-05-16 10:52:28 +02:00
Dylan Griffith 0e5c1a89f0 Fix spec/features/admin/admin_runners_spec.rb + test style improvements 2018-05-01 13:44:35 +04:00
Alexis Reigel c585004b59
restrict projects ci controller to project runners 2018-04-23 09:21:54 +02:00
Tomasz Maczukin 5197b1439c
Update tests for settings/ci_cd_controller_spec 2018-04-04 21:32:32 +02:00
Tomasz Maczukin 909c277e56
Move leftovers from pipelines_settings_controller to settings/ci_cd_controller 2018-04-04 19:47:37 +02:00
Matija Čupić e4bb25f04b
Update Projects::Settings::CiCdController#reset_cache specs 2018-03-01 18:18:36 +01:00
Matija Čupić 21a713f9c4
Change reset_cache action from get to post 2018-01-05 19:22:14 +01:00
Matija Čupić 9c9f7dc639
Merge branch 'master' into 41249-clearing-the-cache 2018-01-04 23:38:13 +01:00
Matija Čupić f834e2907d
Move cache reset to ci_cd_settings controller 2018-01-04 22:17:01 +01:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Tim Zallmann 64e589c581 Resolve "Inconsistent location of members page between groups and projects" 2017-07-07 14:40:41 +00:00
Jose Ivan Vargas bd9887e617 Fixed repository_controller_spec
also added an #open_branches private method
2017-03-06 09:47:44 -06:00
Jose Ivan Vargas 43958926c5 Added delegations to comply with the new rubocop rules
Also fixed the deploy_keys view and moved the code from the repository_helper
to the repository_controller
2017-03-06 09:47:44 -06:00
Jose Ivan Vargas a29517dd0c Added tests for the repository_controller and repository_helper
Added specs for the deploy_keys_presenter and added a new method in the presenter
called #key_available?

Fixed some minor UX inconsistencies and added a concern to handle
redirection
2017-03-06 09:47:44 -06:00
Jose Ivan Vargas d9d417d405 Added a variable_controller_spec test to test for flash messages on the #create action 2017-02-06 14:51:19 -06:00
Jose Ivan Vargas 6004519546 Fixed tests, renamed files and methods 2017-02-06 14:51:18 -06:00
Jose Ivan Vargas e4b345ca4c Removed options from the gear button in the projects and consolidated into one
Added test for the CiCdPipelinesController
2017-02-06 14:51:18 -06:00
Robert Speicher 4642ca6686 Use `empty_project` where possible in controller specs 2017-01-25 17:14:38 -05:00
Jose Ivan Vargas 373411d18d Corrected code style and titles 2017-01-18 15:19:35 -06:00
Jose Ivan Vargas bc7c6c6892 Fixed more tests 2017-01-18 15:19:35 -06:00
Jose Ivan Vargas 1ee4f98694 Fixed spinach feature tests for the services and hooks controllers
Added a test for the integrations controller
2017-01-18 15:19:35 -06:00
Jose Ivan Vargas cfd8f635b3 Added tests for the MembersController and corrected some more tests 2017-01-03 10:52:14 -06:00