Commit Graph

43 Commits

Author SHA1 Message Date
🙈 jacopo beschi 🙉 c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Matija Čupić 05103f080c
Make Variable key not secret 2018-03-22 12:08:16 +01:00
Matija Čupić 53915c5c54
Alias secret_key and secret_value to key and value 2018-03-17 16:33:36 +01:00
Matija Čupić 28a5f8c60a
Use secret_key and secret_value in Variables controller 2018-03-16 16:56:42 +01:00
Matija Čupić efcdc269e0
Fix static_analysis failure 2018-02-06 17:56:54 +01:00
Matija Čupić c95c3ffc9e
Switch emphasis from controller format to update 2018-02-05 18:58:20 +01:00
Matija Čupić e2c8a2231b
Remove usage of VariablePresenter in controller 2018-02-05 18:58:20 +01:00
Matija Čupić 9be519c199
Add VariableSerializer for Ci::Variable 2018-02-05 18:58:19 +01:00
Matija Čupić b48d8c8ad0
Return all variables after UPDATE 2018-02-05 18:58:19 +01:00
Matija Čupić 0bfcdd66bf
Use `resource` in Project Variables routing scheme 2018-02-05 18:58:18 +01:00
Matija Čupić 6b82a9ef51
Format validation errors as human readable messages 2018-02-05 18:58:18 +01:00
Matija Čupić bf2a040cf9
Pass validation errors in JSON endpoint 2018-02-05 18:58:18 +01:00
Matija Čupić edbe911b04
Remove redundant routes in VariablesController 2018-02-05 18:57:43 +01:00
Matija Čupić 5de85708ce
Use nested attributes for updating multiple variables 2018-02-05 18:57:43 +01:00
Matija Čupić ba07784192
Add destroy functionality to save_multiple 2018-02-05 18:57:43 +01:00
Matija Čupić c64181ce4c
Move variable loading into before_action 2018-02-05 18:57:43 +01:00
Matija Čupić b91539d68f
Refactor VariablesController#save_multiple 2018-02-05 18:57:42 +01:00
Matija Čupić 121d84d774
Implement multiple variable handling action 2018-02-05 18:57:42 +01:00
Matija Čupić fe96a1f268
Stub multiple variable controller method 2018-02-05 18:57:42 +01:00
Shinya Maeda 474d25e2e1 Use variable_params && variable_params_attributes in project variables_controller.rb 2017-07-07 15:46:23 +09:00
Shinya Maeda b7d17aab66 Use new project_variables_path in this MR 2017-07-07 15:35:12 +09:00
Shinya Maeda 8c434a52fc gb nice catches 2017-07-07 15:35:12 +09:00
Shinya Maeda 61d5b13888 Adopt project_variable_path instead of namespace_project_variable_path. (Resolve confilct from master) 2017-07-07 15:35:12 +09:00
Shinya Maeda e255e4de69 ayufan nice catches 2017-07-07 15:35:12 +09:00
Shinya Maeda 2dd9a9af2f Fix variables_controller.rb and format 2017-07-07 15:35:12 +09:00
Shinya Maeda 5b0954759c Basic BE change
Fix static-snalysis

Move the precedence of group secure variable before project secure variable. Allow project_id to be null.

Separate Ci::VariableProject and Ci::VariableGroup

Add the forgotton files

Add migration file to update type of ci_variables

Fix form_for fpr VariableProject

Fix test

Change the table structure according to the yorik advice

Add necessary migration files. Remove unnecessary migration spec.

Revert safe_model_attributes.yml

Fix models

Fix spec

Avoid self.variable. Use becomes for correct routing.

Use unique index on group_id and key

Add null: false for t.timestamps

Fix schema version

Rename VariableProject and VariableGroup to ProjectVariable and GroupVariable

Rename the rest of them

Add the rest of files

Basic BE change

Fix static-snalysis

Move the precedence of group secure variable before project secure variable. Allow project_id to be null.

Separate Ci::VariableProject and Ci::VariableGroup

Add the forgotton files

Add migration file to update type of ci_variables

Fix form_for fpr VariableProject

Fix test

Change the table structure according to the yorik advice

Add necessary migration files. Remove unnecessary migration spec.

Revert safe_model_attributes.yml

Fix models

Fix spec

Avoid self.variable. Use becomes for correct routing.

Use unique index on group_id and key

Add null: false for t.timestamps

Fix schema version

Rename VariableProject and VariableGroup to ProjectVariable and GroupVariable

Rename the rest of them

Add the rest of files

Implement CURD

Rename codes related to VariableGroup and VariableProject FE part

Remove unneccesary changes

Make Fe code up-to-date

Add protected flag to migration file

Protected group variables essential package

Update schema

Improve doc

Fix logic and spec for models

Fix logic and spec for controllers

 Fix logic and spec for views(pre feature)

Add feature spec

Fixed bugs. placeholder. reveal button. doc.

Add changelog

Remove unnecessary comment

godfat nice catches

Improve secret_variables_for arctecture

Fix spec

Fix StaticAnlysys & path_regex spec

Revert "Improve secret_variables_for arctecture"

This reverts commit c3216ca212322ecf6ca534cb12ce75811a4e77f1.

Use ayufan suggestion for secret_variables_for

Use find instead of find_by

Fix spec message for variable is invalid

Fix spec remove variable.group_id = group.id

godffat spec nitpicks

Use include Gitlab::Routing.url_helpers for presenter spec
2017-07-07 15:33:17 +09:00
Lin Jen-Shin d9435d6121 Backports for ee-2112
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
2017-07-06 16:25:03 +08:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
blackst0ne a544e46bb0 Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers 2017-06-07 09:45:16 +11:00
Lin Jen-Shin efebdba21d Frontend implementation, tests, and changelog 2017-05-25 19:31:21 +08:00
Jose Ivan Vargas b5df3bffd7 Updated the #create action to render the show view in case of a form error 2017-02-06 14:51:19 -06:00
Jose Ivan Vargas 44bb70c8c9 Improved code styling on the variables_controller_spec
Also updated the #update action inside the variables controller as
to render the show and not redirect back to the settings route
2017-02-06 14:51:19 -06:00
Jose Ivan Vargas f3aaf906d4 Added tests for the variables controller #update action 2017-02-06 14:51:19 -06:00
Jose Ivan Vargas 9739f2c945 Modified redirection logic in the variables cont.
Redirections now show a flash message wether the variable was created correctly or not using a flash message
2017-02-06 14:51:19 -06:00
Jose Ivan Vargas c500e958fb Added redirections to the index actions for the variables and triggers controllers 2017-02-06 14:51:19 -06:00
Jose Ivan Vargas 8ffe586b77 Changed the controller/route name to 'ci/cd' and renamed the corresponding files
Added tests to verify the access policy to the new controller
2017-02-06 14:51:18 -06:00
Jose Ivan Vargas 08ecab6013 changed pipelines controller name to ci_cd_pipelines 2017-02-06 14:51:18 -06:00
Jose Ivan Vargas 58110293d4 Converted the views to partials that compose the menu item "pipelines" 2017-02-06 14:51:18 -06:00
Phil Hughes bda2c44a0b Project variables UI
Closes #14091
2016-05-16 10:21:51 +01:00
Kamil Trzcinski 055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +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 037defc7de
Move CI variables page to project settings
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-28 17:19:20 +02:00