Commit Graph

444 Commits

Author SHA1 Message Date
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
Francisco Javier López 7d85448b58 Fix bug when project export to remote url fails 2019-04-24 15:34:06 +00:00
Thong Kuah d119d3d1b2 Align UrlValidator to validate_url gem implementation.
Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement.
Make use of the options attribute of the parent class ActiveModel::EachValidator.
Add more options: allow_nil, allow_blank, message.
Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
2019-04-11 06:29:07 +00:00
John Jarvis 69b65a6b74 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02 2019-04-02 10:12:32 +02:00
Oswaldo Ferreira 03e0604d5d Prepare suggestion implementation for multi-line
Adds the groundwork needed in order to persist multi-line suggestions,
while providing the parsing strategy which will be reused for the
**Preview** as well.
2019-03-27 12:26:53 -03:00
Igor Drozdov 732f892db3 Return cached languages if they've been detected before 2019-03-20 20:33:49 +03:00
Pirate Praveen c122014fd3
Update acts-as-taggable-on 5.0 -> 6.0
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-18 12:08:48 +01:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Francisco Javier López ebf16ada85 Arbitrary file read via MergeRequestDiff 2019-03-04 18:36:34 +00:00
James Lopez c643042a49
Fix project import error on releases 2019-02-22 15:07:53 +01:00
Lin Jen-Shin ab06c9b654 Merge branch 'remove-ignored-columns' into 'master'
Remove two ignored columns

See merge request gitlab-org/gitlab-ce!25250
2019-02-15 12:47:29 +00:00
Nick Thomas 80a7aa9905
Remove further instances of st_diffs 2019-02-14 16:21:24 +00:00
James Lopez 401a3bca40
Fix import_jid error on project import 2019-02-14 09:29:42 +01:00
Nick Thomas f9e41d0d85
Allow MR diffs to be placed into an object store 2019-02-05 14:12:48 +00:00
Reuben Pereira 2079444091 DB and model changes for Sentry project selection dropdown 2019-02-04 12:12:24 +00:00
James Lopez f78545af98
Fix tree restorer visibility level 2019-01-31 16:52:49 +01:00
James Lopez 57f082d969
Fix path disclosure on Project Import 2019-01-31 16:51:16 +01:00
Douwe Maan cfa7108210 Merge branch '49231-import-issues-csv' into 'master'
Import issues from CSV

Closes #49231

See merge request gitlab-org/gitlab-ce!23532
2019-01-07 23:15:53 +00:00
Reuben Pereira f40b5860d7 Add table and model for error tracking settings 2019-01-07 17:55:21 +00:00
Heinrich Lee Yu 63e9969ca3 Refactor upload service to return uploader
Also changes old calls to the service
2019-01-07 11:16:58 +08:00
Kamil Trzciński 0103d5be96 Add config_options|variables to BuildMetadata
These are data columns that store runtime configuration
of build needed to execute it on runner and within pipeline.

The definition of this data is that once used, and when no longer
needed (due to retry capability) they can be freely removed.

They use `jsonb` on PostgreSQL, and `text` on MySQL (due to lacking
support for json datatype on old enough version).
2019-01-04 16:38:17 +01:00
Shinya Maeda 66755c9ed5 Support CURD operation for release asset links
- Add Releases::Links model
- Expose it in release API
- Add integration tests
2019-01-04 22:17:02 +09:00
Stan Hu 2341692c49 Drop Webhooks from project import/export config
Webhook URLs were recently encrypted in the database via
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21645, and as a
result they are no longer exported. When an exported project with
Webhooks is imported, the project import service will fail with
`URI::InvalidURIError: bad URI(is not URI?)` due to a blank URL.
We avoid this by disabling the export/import of Webhooks in
the first place.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53513
2019-01-03 06:22:14 -08:00
James Lopez 43cc0d5a4a
Fix persistent symlink in project import
- Fix permissions after untar is done
- Refactor command line util
2018-12-17 16:14:35 +01:00
Alessio Caiazza b782ba1113
Add name, author and sha to releases
This commit adds a name to each release, defaulting it to tag name,
keeps track of the SHA when a new release is created and tracks the
current user as release author.
2018-12-13 12:15:21 +01:00
Rémy Coutable eadd53b969 Merge branch 'sh-remove-gitlab-shell-include' into 'master'
Remove unnecessary includes of ShellAdapter

See merge request gitlab-org/gitlab-ce!23607
2018-12-10 16:22:53 +00:00
Kamil Trzciński a910c09bbc Encrypt CI/CD builds tokens
Brings back 1e8f1de0 reverted in !23644

Closes #52342

See merge request gitlab-org/gitlab-ce!23436
2018-12-07 10:42:47 +01:00
Robert Speicher 950b9130ad
Revert "Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'"
This reverts commit 1e8f1de034, reversing
changes made to 62d971129d.
2018-12-06 18:53:24 -06:00
Nick Thomas 9395d198f9
Use BFG object maps to clean projects 2018-12-06 18:58:00 +00:00
Kamil Trzciński 1e8f1de034 Merge branch 'fix/gb/encrypt-ci-build-token' into 'master'
Encrypt CI/CD builds tokens

Closes #52342

See merge request gitlab-org/gitlab-ce!23436
2018-12-06 09:42:18 +00:00
Stan Hu e96fd232a6 Remove unnecessary includes of ShellAdapter
Determined by running the script:

```
included = `git grep --name-only ShellAdapter`.chomp.split("\n")
used = `git grep --name-only gitlab_shell`.chomp.split("\n")
included - used
```
2018-12-05 23:19:27 -08:00
Francisco Javier López a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Grzegorz Bizon ca2c5ddba7 Exclude encrypted build token from import/export and retries 2018-12-05 10:53:48 +01:00
Grzegorz Bizon 0b8a2779e7 Merge branch 'master' into fix/gb/encrypt-runners-tokens
* master: (243 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-28 13:14:04 +01:00
Tiago Botelho 4bd8a427d4
Removes all the irrelevant import related code and columns
Clears the import related columns and code from the Project
model over to the ProjectImportState model
2018-11-27 12:58:13 +00:00
Grzegorz Bizon 88e2b6ea9f Merge remote-tracking branch 'dev/master' into security-encrypt-runners-tokens
* dev/master: (302 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-21 11:02:31 +01:00
Grzegorz Bizon e491df5fc6 Encrypt runners communication token in the database 2018-11-20 16:30:39 +01:00
Grzegorz Bizon 478c15fa89 Exclude runners tokens from GitLab project exports 2018-11-20 16:15:09 +01:00
Steve Azzopardi 282a5b4c84
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2018-11-20 10:11:42 +01:00
Stan Hu 2e3674f7a8 Prevent templated services from being imported
Templated services should only be created by admins and does not
apply to project import/export.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54189
2018-11-19 15:41:41 -08:00
gfyoung 7ec8af5017 Enable even more frozen string for lib/gitlab
Enables frozen string for the following:

* lib/gitlab/hook_data/**/*.rb
* lib/gitlab/i18n/**/*.rb
* lib/gitlab/import/**/*.rb
* lib/gitlab/import_export/**/*.rb
* lib/gitlab/kubernetes/**/*.rb
* lib/gitlab/legacy_github_import/**/*.rb
* lib/gitlab/manifest_import/**/*.rb
* lib/gitlab/metrics/**/*.rb
* lib/gitlab/middleware/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-16 17:41:14 -08:00
Nick Thomas 270155d655
Start tracking pool repositories 2018-11-05 01:40:29 +00:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Nick Thomas fb48eaba46
Encrypt webhook tokens and URLs in the database 2018-10-01 15:33:36 +01:00
James Lopez 6e641789fc
Fix null pipeline problem 2018-09-24 11:23:47 +02:00
James Lopez 678ceb257e
use find instead of reject in avatar export file 2018-09-11 10:22:34 +02:00
James Lopez 994d91883b
fix avatar restorer 2018-09-11 08:59:14 +02:00
Douwe Maan 1f765ce9ea Merge branch '48778-remove-old-storage-logic-from-import-export' into 'master'
Resolve "Remove old storage logic from Import/Export"

Closes #51144, #50109, #48778, and #51079

See merge request gitlab-org/gitlab-ce!21409
2018-09-07 14:28:25 +00:00
Jan Provaznik d95c1f0335 Use ResourceLabelEvent for tracking label changes 2018-09-07 13:39:20 +00:00
James Lopez f1277fbf0b
refactor code based on feedback 2018-09-07 14:43:51 +02:00