Commit Graph

646 Commits

Author SHA1 Message Date
GitLab Bot a1ed98e0c8 Add latest changes from gitlab-org/gitlab@master 2020-01-31 00:09:13 +00:00
GitLab Bot 7cc6872401 Add latest changes from gitlab-org/gitlab@master 2020-01-29 12:09:08 +00:00
GitLab Bot 7e8278c0f4 Add latest changes from gitlab-org/gitlab@master 2020-01-28 09:09:06 +00:00
GitLab Bot ee7de3a24d Add latest changes from gitlab-org/gitlab@master 2020-01-28 00:08:46 +00:00
GitLab Bot 411cc77938 Add latest changes from gitlab-org/gitlab@master 2020-01-24 18:09:00 +00:00
GitLab Bot be3e24ea3c Add latest changes from gitlab-org/gitlab@master 2020-01-22 12:08:40 +00:00
GitLab Bot e0ab7eda1b Add latest changes from gitlab-org/gitlab@master 2020-01-20 18:08:44 +00:00
GitLab Bot 40254b9ace Add latest changes from gitlab-org/gitlab@master 2020-01-17 21:08:29 +00:00
GitLab Bot 22a0d312ae Add latest changes from gitlab-org/gitlab@master 2020-01-17 18:08:41 +00:00
GitLab Bot 37eff29d5c Add latest changes from gitlab-org/gitlab@master 2020-01-17 15:08:37 +00:00
GitLab Bot efb0c7f501 Add latest changes from gitlab-org/gitlab@master 2020-01-17 00:09:00 +00:00
GitLab Bot aa0f0e9921 Add latest changes from gitlab-org/gitlab@master 2020-01-16 18:08:46 +00:00
GitLab Bot 4ce0bee95d Add latest changes from gitlab-org/gitlab@master 2020-01-14 12:07:41 +00:00
GitLab Bot f32a580aa1 Add latest changes from gitlab-org/gitlab@master 2020-01-13 18:08:05 +00:00
GitLab Bot 7873bb3c1a Add latest changes from gitlab-org/gitlab@master 2020-01-11 00:08:28 +00:00
GitLab Bot 6f0f893bd8 Add latest changes from gitlab-org/gitlab@master 2020-01-10 18:07:43 +00:00
GitLab Bot b4028d4500 Add latest changes from gitlab-org/gitlab@master 2020-01-07 15:07:34 +00:00
GitLab Bot c0d8f9f3f9 Add latest changes from gitlab-org/gitlab@master 2020-01-03 09:07:33 +00:00
GitLab Bot af8c2a780d Add latest changes from gitlab-org/gitlab@master 2019-12-27 12:07:59 +00:00
GitLab Bot 3888bc4261 Add latest changes from gitlab-org/gitlab@master 2019-12-24 00:07:31 +00:00
GitLab Bot 898e2cc1df Add latest changes from gitlab-org/gitlab@master 2019-12-20 09:24:38 +00:00
GitLab Bot 2a65a97e12 Add latest changes from gitlab-org/gitlab@master 2019-12-18 00:08:09 +00:00
GitLab Bot e723867717 Add latest changes from gitlab-org/gitlab@master 2019-12-17 18:07:48 +00:00
GitLab Bot 7480d774df Add latest changes from gitlab-org/gitlab@master 2019-12-17 00:07:59 +00:00
GitLab Bot 123c68a7cf Add latest changes from gitlab-org/gitlab@master 2019-12-16 18:08:22 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
GitLab Bot 092b86f100 Add latest changes from gitlab-org/gitlab@master 2019-12-12 21:08:10 +00:00
GitLab Bot 8e22ef10e4 Add latest changes from gitlab-org/gitlab@master 2019-12-12 06:07:42 +00:00
GitLab Bot b86f474bf5 Add latest changes from gitlab-org/gitlab@master 2019-12-11 12:08:10 +00:00
GitLab Bot 5e11c9b77c Add latest changes from gitlab-org/gitlab@master 2019-12-10 12:07:55 +00:00
GitLab Bot cfc792b9ca Add latest changes from gitlab-org/gitlab@master 2019-12-10 07:53:40 +00:00
GitLab Bot 6a7cc8c147 Add latest changes from gitlab-org/gitlab@master 2019-12-05 18:07:51 +00:00
GitLab Bot 7cdd70dcec Add latest changes from gitlab-org/gitlab@master 2019-11-28 15:06:57 +00:00
DJ Mountney 0531a33889 Ensure attributes that end in `_ids` are cleaned
This prevents an issue where you can steal other projects objects by
asking for ids that don't belong to you in import.
2019-11-26 10:26:25 +01:00
GitLab Bot 88542a5e96 Add latest changes from gitlab-org/gitlab@master 2019-11-19 15:06:24 +00:00
GitLab Bot b570d73ecd Add latest changes from gitlab-org/gitlab@master 2019-11-19 12:06:00 +00:00
GitLab Bot 3209c1a49c Add latest changes from gitlab-org/gitlab@master 2019-11-19 06:06:07 +00:00
GitLab Bot 16d9f66e96 Add latest changes from gitlab-org/gitlab@master 2019-11-18 12:06:03 +00:00
GitLab Bot 41d446ba3f Add latest changes from gitlab-org/gitlab@master 2019-11-15 03:06:34 +00:00
GitLab Bot 0c3f121493 Add latest changes from gitlab-org/gitlab@master 2019-11-11 21:06:20 +00:00
GitLab Bot 16bd8409bc Add latest changes from gitlab-org/gitlab@master 2019-11-11 12:06:23 +00:00
GitLab Bot ab0f1c7a99 Add latest changes from gitlab-org/gitlab@master 2019-11-09 00:06:35 +00:00
GitLab Bot fd0691c6c0 Add latest changes from gitlab-org/gitlab@master 2019-10-31 00:07:00 +00:00
GitLab Bot 3fe9588b1c Add latest changes from gitlab-org/gitlab@master 2019-10-30 15:14:17 +00:00
GitLab Bot 7515ec41c5 Add latest changes from gitlab-org/gitlab@master 2019-10-28 18:06:15 +00:00
GitLab Bot 1a3d7b9fcd Add latest changes from gitlab-org/gitlab@master 2019-10-28 06:06:30 +00:00
GitLab Bot 543081566d Add latest changes from gitlab-org/gitlab@master 2019-10-25 03:06:02 +00:00
GitLab Bot 25989ab7ef Add latest changes from gitlab-org/gitlab@master 2019-10-18 11:11:44 +00:00
GitLab Bot f03a645e74 Add latest changes from gitlab-org/gitlab@master 2019-10-11 12:06:29 +00:00
GitLab Bot 185f428fa5 Add latest changes from gitlab-org/gitlab@master 2019-10-07 12:06:18 +00:00
GitLab Bot 5ecacec304 Add latest changes from gitlab-org/gitlab@master 2019-10-04 15:06:38 +00:00
GitLab Bot 0d46bf0638 Add latest changes from gitlab-org/gitlab@master 2019-10-04 12:06:14 +00:00
GitLab Bot 927cfbfe63 Add latest changes from gitlab-org/gitlab@master 2019-10-03 12:06:00 +00:00
GitLab Bot 427b23c127 Add latest changes from gitlab-org/gitlab@master 2019-10-03 00:05:59 +00:00
GitLab Bot 9e27f0d920 Add latest changes from gitlab-org/gitlab@master 2019-10-01 12:05:59 +00:00
GitLab Bot 94611567bd Add latest changes from gitlab-org/gitlab@master 2019-09-30 09:06:31 +00:00
GitLab Bot 20450649ca Add latest changes from gitlab-org/gitlab@master 2019-09-27 09:06:26 +00:00
GitLab Bot 41aba3c68d Add latest changes from gitlab-org/gitlab@master 2019-09-27 00:06:23 +00:00
GitLab Bot aabf412bc1 Add latest changes from gitlab-org/gitlab@master 2019-09-25 12:06:15 +00:00
GitLab Bot 2c352d252d Add latest changes from gitlab-org/gitlab@master 2019-09-19 03:06:10 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Kamil Trzciński 0e56c1e7cb Improve performance and memory usage of project export
ActiveModel::Serialization is simple in that it recursively calls
`as_json` on each object to serialize everything. However, for a model
like a Project, this can generate a query for every single association,
which can add up to tens of thousands of queries and lead to memory
bloat.

To improve this, we can do several things:

1. We use `tree:` and `preload:` to automatically generate
   a list of all preloads that could be used to serialize
   objects in bulk.

2. We observe that a single project has many issues, merge requests,
   etc. Instead of serializing everything at once, which could lead to
   database timeouts and high memory usage, we take each top-level
   association and serialize the data in batches.

For example, we serialize the first 100 issues and preload all of
their associated events, notes, etc. before moving onto the next
batch. When we're done, we serialize merge requests in the same way.
We repeat this pattern for the remaining associations specified in
import_export.yml.
2019-09-09 15:40:49 +00:00
Kamil Trzciński 0eeadb2dd2 Normalize import_export structure
This brings a significant refactor to how
we handle `import_export.yml`, merge it with EE
and how we handle that for reader and saver.

This is meant to simplify the code, and remove
a ton of conditions to handle different models
of the structure.

This is also meant to prepare the structure
to extend it much easier, like adding `preload:`
or additional object types when needed.

This does not change the behavior of import/export,
rather unifies and simplifies the current implementation.
2019-09-06 14:21:17 +02:00
Kamil Trzciński 0e0a4d7881 Merge branch 'ce-detect-github-pull-requests' into 'master'
Port CreateGithubPullRequestEvents migration from EE

See merge request gitlab-org/gitlab-ce!31802
2019-09-06 10:10:47 +00:00
Will Chandler 525449d7ce Stop empty external auth classification labels overriding default labels
Most of the project templates bundled with GitLab have an empty string
set for `external_authorization_classification_label` in their
`project.json`. When imported this overrides the default label set on
the instance, causing the label to appear empty.

This change sets empty labels to nil during import, allowing the
default label to override it and be applied to the project.
2019-09-06 08:33:18 +00:00
Fabio Pitino ca6a1f33f9 CE port for pipelines for external pull requests
Detect if pipeline runs for a GitHub pull request

When using a mirror for CI/CD only we register a pull_request
webhook. When a pull_request webhook is received, if the
source branch SHA matches the actual head of the branch in the
repository we create immediately a new pipeline for the
external pull request. Otherwise we store the
pull request info for when the push webhook is received.

When using "only/except: external_pull_requests" we can detect
if the pipeline has a open pull request on GitHub and create or
not the job based on that.
2019-09-05 15:53:48 +01:00
dineshpanda e908e11776 Avoid calling freeze on already frozen strings in lib/gitlab 2019-09-04 09:52:02 +05:30
Brett Walker 3489dc3d72 Allow disabling group/project email notifications
- Adds UI to configure in group and project settings
- Removes notification configuration for users when
disabled at group or project level
2019-08-15 17:37:36 +00:00
Stan Hu 26107e9354 Properly save suggestions in project exports
Previously imports would fail if a merge request note included a
suggestion with an
`ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection`
exception.

This was happening because suggestions were listed as a descendant of
merge requests, but this doesn't work because suggestions are directly
associated with notes, not merge requests, and that association is lost.
Rails also disallows creating intializing a has_many association through
a different object.

We fix this by making `suggestions` a child of `notes` within a merge
request. This doesn't fix previously broken exported project exports,
but new exports will work.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65880
2019-08-10 18:50:42 -07:00
Jason Colyer f4ceff6e0c Make Issue boards importable
- Added space to li definiton
- Remove milestone from import_export.yml
2019-08-05 08:28:39 -05:00
Jason Colyer 87235d009c Make issue boards importable
- Added Importable to models/list.rb
- Did unless: :importable? on board validation
- Created changelog
- Modified haml to show issue boards are importable
- Added needed spec tests
- Modified project.json to include board information
- Added relevant models to all_models
- Added relevant models to import_export
- Added relevant models to safe_model_attributes
2019-08-02 14:35:10 -05:00
Stan Hu 0d538e44af Merge branch 'optimise-import-performance' into 'master'
Optimise import performance

Closes #64924

See merge request gitlab-org/gitlab-ce!31045
2019-07-24 18:01:44 +00:00
Kamil Trzciński 8d1e97fc3b Optimise import performance
- Fix `O(n)` complexity of `append_or_update_attribute`,
  we append objects to an array and re-save project
- Remove the usage of `keys.include?` as it performs `O(n)`
  search, instead use `.has_key?`
- Remove the usage of `.keys.first` as it performs a copy
  of all keys, instead use `.first.first`
2019-07-24 16:24:28 +02:00
Luke Duncalfe d18ee3faad LFS export records repository_type data
A project can have the same `LfsObject` linked with up to three
`LfsObjectsProject` records. Each of these records would be for a
different repository, recorded in the `repository_type` property. The
different repositories at time of writing are "project", "wiki", and
"design". See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894

This change exports the list of `repository_type`s as a JSON mapping of
oid => repository_types, which are imported to recreate the correct
`LfsObjectsProject` records.

https://gitlab.com/gitlab-org/gitlab-ee/issues/11090
2019-07-24 11:23:51 +00:00
Ash McKenzie 69adeb3718 Merge branch 'georgekoltsov/64377-add-better-log-msg-to-members-mapper' into 'master'
Add better error message to MembersMapper#ensure_default_member!

See merge request gitlab-org/gitlab-ce!30838
2019-07-23 11:48:33 +00:00
George Koltsov 3463c24d40 Add changelog entry 2019-07-23 09:23:50 +01:00
George Koltsov 9ef196b7a7 Set Private visibility for restricted Internal imported projects
With https://gitlab.com/gitlab-org/gitlab-ee/issues/12388 change going
live there is potential risk of breaking imports of 'Internal' projects.
This change makes sure if 'Internal' visibility level is restricted
all 'Internal' projects will be marked as 'Private'

See: https://gitlab.com/gitlab-org/gitlab-ce/issues/64311
2019-07-19 03:00:23 +00:00
George Koltsov 8e6af8c59f Add better error message MembersMapper#ensure_default_member!
More details in: https://gitlab.com/gitlab-org/gitlab-ce/issues/64377
2019-07-17 11:30:31 +01:00
Kamil Trzciński d9b9aace9f Merge branch 'remove-support-for-legacy-pipeline-triggers' into 'master'
Remove support for legacy pipeline triggers

Closes #30231

See merge request gitlab-org/gitlab-ce!30133
2019-07-16 12:16:12 +00:00
Fabio Pitino c2396ce036 Do not import legacy triggers from project JSON 2019-07-15 15:05:22 +02:00
Fabio Pitino 2397f171a3 Ensure ImportExport maintains trigger ownership 2019-07-15 15:05:22 +02:00
George Koltsov ec51240685 Add commit_id to AttributeCleaner::ALLOWED_REFERENCES 2019-07-15 10:30:39 +01:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00
Nick Thomas 381468d0cc
Allow asynchronous rebase operations to be monitored
This MR introduces tracking of the `rebase_jid` for merge requests. As
with `merge_ongoing?`, `rebase_in_progress?` will now return true if a
rebase is proceeding in sidekiq.

After one release, we should remove the Gitaly-based lookup of rebases.
It is much better to track this kind of thing via the database.
2019-07-04 08:50:55 +01:00
Yorick Peterse 8469f59d78
Backport the EE schema and migrations to CE
This backports all EE schema changes to CE, including EE migrations,
ensuring both use the same schema.

== Updated tests

A spec related to ghost and support bot users had to be modified to make
it pass. The spec in question assumes that the "support_bot" column
exists when defining the spec. In the single codebase setup this is not
the case, as the column is backported in a later migration. Any attempt
to use a different schema version or use of "around" blocks to
conditionally disable specs won't help, as reverting the backport
migration would also drop the "support_bot" column. Removing the
"support_bot" tests entirely appears to be the only solution.

We also need to update some foreign key tests now that we have
backported the EE columns. Fortunately, these changes are very minor.

== Backporting migrations

This commit moves EE specific migrations (except those for the Geo
tracking database) and related files to CE, and also removes any traces
of the ee/db directory.

Some migrations had to be modified or removed, as they no longer work
with the schema being backported. These migrations were all quite old,
so we opted for removing them where modifying them would take too much
time and effort.

Some old migrations were modified in EE, while also existing in CE. In
these cases we took the EE code, and in one case removed them entirely.
It's not worth spending time trying to merge these changes somehow as we
plan to remove old migrations around the release of 12.0, see
https://gitlab.com/gitlab-org/gitlab-ce/issues/59177 for more details.
2019-06-17 17:09:05 +02:00
Shinya Maeda c5c41ae065 Ignore legacy artifact columns in Project Import/Export
Ignore some columns
2019-06-11 18:39:29 +07:00
Robert Speicher a2c767b9f8
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2019-06-03 10:04:57 -07:00
Robert Speicher 2b13462ac4 Merge branch 'security-58856-persistent-xss-in-note-objects' into 'master'
Persistent XSS in note objects CE

See merge request gitlab/gitlabhq!3075
2019-06-03 17:01:10 +00:00
Liam McAndrew 5ddb32f382 Fix order dependency with user params during imports 2019-05-28 10:31:51 +00:00
James Lopez 30d915110f Fix issue importing members with owner access 2019-05-23 13:10:38 +00:00
Stan Hu 5c8cd42bbd Fix invalid visibility string comparison in project import
This resolves an "ArgumentError: comparison of String with 0 failed"
issue where the visibility_level is stored as a string in the project
import data because the value comes directly from the Web form. This
problem happened upon creating a project from a template or restoring a
project.

We now cast the value to an integer to guard against these kinds of
failures.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61692
2019-05-22 11:32:23 -07:00
Heinrich Lee Yu e938d241ea Include type to notes import / export 2019-05-17 16:45:40 +08:00
charlieablett 0aff6238f7 Change `prohibited_key` to use regexes 2019-05-01 12:15:29 +12:00
charlieablett 4b46b53082 Add `html` to sensitive words 2019-05-01 10:38:41 +12:00
charlieablett 1cbdc5326c Refactor `attribute_cleaner` for readability 2019-04-30 11:25:09 +12:00
charlieablett b240012c4f Further clarify `attribute_cleaner` 2019-04-29 21:31:16 +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
charlieablett 4bd331a568 Tighten up prohibited_key method 2019-04-26 09:40:00 +12:00
Charlie Ablett 8eae788fd4 Use English instead of Latin 2019-04-25 09:39:53 +12:00
Francisco Javier López 7d85448b58 Fix bug when project export to remote url fails 2019-04-24 15:34:06 +00:00
charlieablett 7e6befc05d Add disallowed fields to AttributeCleaner 2019-04-24 14:31:20 +12:00
charlieablett 0f2dff6264 Exclude fields from note import 2019-04-23 20:57:24 +12: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