Commit Graph

41 Commits

Author SHA1 Message Date
GitLab Bot 3b28c7e3b2 Add latest changes from gitlab-org/gitlab@master 2023-06-30 15:10:49 +00:00
GitLab Bot c1f98d9590 Add latest changes from gitlab-org/gitlab@master 2023-02-16 15:07:53 +00:00
GitLab Bot 54943f1e68 Add latest changes from gitlab-org/gitlab@master 2022-12-08 18:08:30 +00:00
GitLab Bot 044a953eb6 Add latest changes from gitlab-org/gitlab@master 2022-12-08 00:07:09 +00:00
GitLab Bot fda0e422a7 Add latest changes from gitlab-org/gitlab@master 2022-10-24 09:11:03 +00:00
GitLab Bot 13d294a8d8 Add latest changes from gitlab-org/gitlab@master 2022-07-14 00:08:59 +00:00
GitLab Bot 139f9c7dc1 Add latest changes from gitlab-org/gitlab@master 2021-08-03 06:08:50 +00:00
GitLab Bot 5d756f9966 Add latest changes from gitlab-org/gitlab@master 2021-03-10 03:09:10 +00:00
GitLab Bot 21341457a8 Add latest changes from gitlab-org/gitlab@master 2020-07-08 09:09:17 +00:00
GitLab Bot 1363ca12f1 Add latest changes from gitlab-org/gitlab@master 2020-03-18 12:09:13 +00:00
Hordur Freyr Yngvason 5f82ff1469 Bring scoped environment variables to core
As decided in https://gitlab.com/gitlab-org/gitlab-ce/issues/53593
2019-08-08 18:51:52 +00:00
Nick Thomas 013f7cd24c
Inherit from ApplicationRecord instead of ActiveRecord::Base 2019-03-28 16:18:23 +00:00
Matija Čupić 316889cb47
Revert "Merge branch 'revert-8baf9e5f' into 'master'"
This reverts commit f5201a816f, reversing
changes made to 48e6db0dad.
2019-02-27 12:52:53 +01:00
Kamil Trzciński 7b445f9b15 Revert "Merge branch '13784-simple-masking-of-protected-variables-in-logs' into 'master'"
This reverts merge request !25293
2019-02-26 17:32:23 +00:00
Matija Čupić c9125c4786 Add Maskable concern for CI variables
This adds a concern that abstracts the concept of masking a variable,
including the RegEx for validation.
2019-02-26 14:03:42 +00:00
gfyoung 388cb319d5 Enable frozen string for app/models/**/*.rb
Partially addresses #47424.
2018-08-03 01:44:16 -07: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ć f2695aa84b
Include CI Variable Key in its uniqueness validation error message 2018-02-23 01:19:46 +01:00
Maxim Rydkin c295d3362b
move `lib/ci/model.rb` into `lib/gitlab/ci/model.rb` 2017-09-12 22:32:01 +03: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 147939b7fc Merge remote-tracking branch 'upstream/master' into add-ci_variables-environment_scope
* upstream/master: (192 commits)
  Minor edits
  Job details won't scroll horizontally to show long lines
  Bring back branches badge to main project page
  Inserts exact matches of username, email and name to the top of the user search list
  Limit OpenGraph image size to 64x64
  Improve changelog
  Split up MergeRequestsController
  Add parent_id back to the tests
  Make changelog more descriptive
  Update README.md to reflect where "Secret variables" are located
  Improve tests text
  Rename members_count to members_count_with_descendants and expose only to group admins
  Fix a bug where an invalid sort param value was passed to Gitaly
  Drop default ORDER scope when calling a find method on a Sortable model
  Add tests for project import state transition: [:started] => [:finished]
  Add CHANGELOG
  Perform housekeeping only when an import of a fresh project is completed
  Strip trailing whitespace in relative submodule URL
  Adjust projects spec on namespace fields
  Add "members_count" and "parent_id" data on namespaces API
  ...
2017-06-29 22:00:57 +08:00
Shinya Maeda 41aebaa103 Decuplin 2017-06-28 15:20:50 +09:00
Lin Jen-Shin d9ad56f3c5 Add environment_scope column to ci_variables table
This is merely to make CE and EE more compatible.
See the EE merge request at:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
2017-06-21 17:30:12 +00:00
Lin Jen-Shin c4dded593a Update docs and use protected secret variable as the name 2017-05-31 22:45:51 +08:00
Lin Jen-Shin 2785bc4faa Merge secret and protected vars to variables_for(ref)
Also introduce Ci::Variable#to_runner_variable to
build up the hash for runner.
2017-05-27 01:46:57 +08:00
Kamil Trzciński 12dd5ac221 All CI offline migrations 2017-03-17 23:06:11 +00:00
Rémy Coutable 4e249d5bae
Use :maximum instead of :within for length validators with a 0..N range
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-06 10:23:17 +01:00
David Wagner 03b6108f6f Remove redundant class_name and foreign_key overrides
They were Rails' default and are unnecessarily overridden.

Signed-off-by: David Wagner <david@marvid.fr>
2016-10-24 22:29:48 +02:00
Diego Souza 43d2cd511c Sort secret variables by key (fix #20870) 2016-09-09 15:06:50 -03:00
James Lopez 31c95aa031 add missing attribute to attr_encrypted so it is fully backwards-compatible 2016-06-28 09:55:19 +02:00
Connor Shea d287315dbf
Upgrade attr_encrypted and encryptor
attr_encrypted (1.3.4 => 3.0.1) Changelog:
https://github.com/attr-encrypted/attr_encrypted/blob/master/CHANGELOG.m
d

attr_encrypted 2.x included a vulnerability, so that major version is
skipped. 3.x requires that the algorithm and mode used by each
encrypted attribute is specified explicitly.

`nil` is no longer a valid value for the encrypted_value_iv field, so
it’s changed to a randomly generated string.
2016-05-30 13:51:21 -06: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
Tomasz Maczukin 220c3a44c9 Merge branch '8-4-stable' into ci/api-variables
* 8-4-stable: (285 commits)
  Add Changelog entry for build traces data integrity fix
  Update doc_styleguide.md [ci skip]
  Added hint that you can search users by name, username, or email.
  Add changelog
  Version 8.4.0.rc1
  Randomize metrics sample intervals
  Make the metrics sampler interval configurable
  Don't automatically require awesome_print
  Disable colorization if STDOUT is not a tty
  Block the reported user before destroying the record
  changes `$quote-gray` to `$secondary-text`
  makes message plural for multiple MRs and removes from loop. Duh.
  Prepare Installation and Update docs for 8.4 RC1
  Mention channel/key bug in irkerd docs
  Revert "Remove the `:coffee` and `:coffeescript` Haml filters"
  gets merge request discussion working again
  adds back in discussion.haml.html for issues commenting and closing/reopening properly.
  removing last chunk of MR ajax changes, rest will be in another MR
  reverting more MR ajax files, will appear in different commit
  reverting MR ajax changes, which will be in a different MR
  ...
2016-01-13 23:59:00 +01:00
Tomasz Maczukin b60c146267 Change :variable_id to :key as resource ID in API 2016-01-07 13:49:38 +01:00
Stan Hu 79c0e7212a Annotate models 2016-01-06 13:09:55 +00:00
Tomasz Maczukin ea4777ff50 Add features for list and show details of variables in API 2015-12-31 16:26:54 +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
Douwe Maan 046b283127 Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00