Commit Graph
430 Commits
Author SHA1 Message Date
Achilleas PipinellisandRémy Coutable bca48a0a85 Merge branch 'feature/import-export-docs' into 'master'
import/export docs

Added documentation for and closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3050

Also added a couple of rake tasks that might be useful.

See merge request !4732

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-22 15:46:55 +02:00
Jacob SchatzandRobert Speicher 355310ba98 Merge branch '17521-gitlab-ci-yml-templates' into 'master'
GitLab CI Yaml template dropdown

## What does this MR do?
Make it possible to select a dropdown for an easy start with GitLab CI.

## What are the relevant issue numbers?
Closes #17521

## TODO
- [ ] Backend
  - [x] CHANGELOG item
  - [x] Fix rubocop failure
  - [x] API Support
  - [x] New tests
  - [x] Add disclaimer to the top of the gitlab-ci.yml
- [ ] Frontend
  - [x] New tests

See merge request !4411
2016-06-21 12:17:47 -04:00
Stan Hu bf92ea687f Properly quote table name in Rake task for MySQL and PostgreSQL compatibility
!4318 broke the gitlab:db:drop_tables functionality for PostgreSQL.

Closes #15259
2016-06-09 15:06:19 -07:00
Stan Hu 4fbb284cfd Merge branch 'fix_issue_15259' into 'master'
Fix bug with SQL syntax error during backup restoration

## What does this MR do?
It properly escapes the table name in the `DROP TABLE IF EXISTS ...` statement used during restore of a backup.

## Are there points in the code the reviewer needs to double check?
Please check compatibility with PostgreSQL

## Why was this MR needed?
Fix an issue with backups can not be restored if MySQL is used as database for GitLab.

## What are the relevant issue numbers?
#15259 

## Screenshots (if relevant)
-

See merge request !4318
2016-06-09 21:44:10 +00:00
Connor Shea efb7da68e6 Fix missed colorize methods. 2016-06-06 15:32:36 -06:00
Connor Shea 903946c78a Replace colorize gem with rainbow.
Colorize is a gem licensed under the GPLv2, so we can’t use it in GitLab without relicensing GitLab under the terms of the GPL. Rainbow is licensed under the MIT license and does the exact same thing as Colorize, so Rainbow was added in place of Colorize.

The syntax is slightly different for Rainbow vs. Colorize, and was updated in accordance.

The gem is still a dependency of Spinach, so it’s included in the development/test environments, but won’t be packaged with the actual product, and therefore doesn’t require we relicense the product.

An attempt at relicensing Colorize was made, but didn’t succeed as the library owner never responded.

Rainbow library: https://github.com/sickill/rainbow
Relevant issue regarding licensing in GitLab's gems: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3775
2016-06-03 10:37:09 -06:00
Daniel Beyer 97aecdeade Fix bug with SQL syntax error during backup restoration
closes #15259
2016-05-27 13:35:12 +02:00
DJ Mountney 1a7326ba9a Switch the gitlab:db:configure task to use tables.any? instead of looking specifically for the schema_migrations table 2016-05-25 10:47:09 -07:00
DJ Mountney 24632d2150 Update hash syntax and add changelog for the gitlab:db:configure rake task 2016-05-25 10:44:22 -07:00
DJ Mountney c6e7d826b2 Add a gitlab:db:configure rake task to handle conditionally seeding or migrating the database. 2016-05-25 10:44:22 -07:00
Kamil Trzcinski 12bd781031 Fix backups if registry is disabled 2016-05-23 14:18:39 -05:00
Zeger-Jan van de WegandAlfredo Sumaran 79620c501d Update API and fetching task 2016-05-20 15:58:36 -05:00
Zeger-Jan van de WegandAlfredo Sumaran e166a8022a Backend for a gitignores dropdown 2016-05-20 15:58:36 -05:00
JazzandLudovic Perrine 8eb1748ab2 Fixed advice on invalid permissions on upload path 2016-05-19 16:53:47 +02:00
Kamil Trzcinski 143cd58c39 Added backup of container registry 2016-05-16 17:25:38 -05:00
Drew Blessing 10d4d5842b Add if exists to drop command 2016-05-09 12:20:18 -05:00
Drew Blessing 50d18a1e1d Rake drop tables with cascade 2016-05-03 09:29:15 -05:00
Yorick Peterse a54af831ba Use rake db:reset instead of db:setup
Using db:reset ensures existing tables are first dropped. This in turn
ensures that we can drop tables regardless of any foreign key
constraints. While CE currently doesn't have any foreign keys EE defines
the following relation:

    remote_mirrors.project_id -> projects.id

MySQL will complain whenever you try to drop the "projects" table first
even when using "DROP TABLE ... CASCADE".
2016-04-14 15:53:54 +02:00
Rémy Coutable 9f218fc184 Improve and finish the fallback to the In-Reply-To and References header for the reply-by-email feature
A few things to note:
- The IncomingEmail feature is now enabled even without a
  correctly-formatted sub-address
- Message-ID for new thread mail are kept the same so that subsequent
  notifications to this thread are grouped in the thread by the email
  service that receives the notification
  (i.e. In-Reply-To of the answer == Message-ID of the first thread message)
- To maximize our chance to be able to retrieve the reply key, we look
  for it in the In-Reply-To header and the References header
- The pattern for the fallback reply message id is "reply-[key]@[gitlab_host]"
- Improve docs thanks to Axil
2016-03-25 13:05:15 +01:00
Drew Blessing 5516b6c47f Reload the schema before restoring a database backup 2016-03-21 21:16:34 -05:00
Douwe Maan 7ae573c75a Bump Git version requirement to 2.7.3 2016-03-15 23:22:05 +01:00
ashleys 4cd9a5208c web hooks to webhooks 2016-03-10 14:48:29 -05:00
Douwe Maan e1baa48584 Fix gitlab:incoming_email:check task. 2016-02-29 11:04:40 +01:00
Marin Jankovski f317d5fcb9 Merge branch 'uploads-700' into 'master'
Restrict permissions on public/uploads

Based on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/631

See merge request !2764
2016-02-23 15:12:20 +00:00
Achilleas Pipinellis e5f9c4460f Remove remaining sqlite method call 2016-02-17 20:34:54 +02:00
Achilleas Pipinellis f8036ec910 Remove sqlite check in raketask 2016-02-10 16:54:15 +02:00
Achilleas Pipinellis a1a6f3cc73 Simplify permissions creation
[ci skip]
2016-02-10 16:52:02 +02:00
Achilleas Pipinellis 751ae14081 Restrict permissions on public/uploads 2016-02-09 11:35:19 +02:00
Robert Speicher e8785ded1e Prevent StateMachine warnings from outputting during a cron task
[ci skip]

Closes #5931
2016-01-15 17:47:56 -05:00
Robert Speicher a43fd5ce6d Disable colorization if STDOUT is not a tty 2016-01-12 21:34:23 -05:00
Stan Hu e57b506222 Suggest prefacing find command with sudo when base permissions are wrong
Closes #5872
2016-01-05 05:30:01 -08:00
Robert Speicher 28a8d0b5db Merge branch 'add_user_repo_integrity_rake_task' into 'master'
Add user repository integrity check rake task

Corrupt repositories and stuck lock files can cause weird issues in
GitLab. Often we know which user is having these problems and then we
have to go hunt down which repository is causing it. Several times
recently that involved me running queries in the rails console to get
an array of projects and then writing a quick Ruby script to loop
through and run `git fsck`. This last time I also had to check for the
existence of `config.lock` and ref lock files. 

This rake task will eliminate all of those steps and allow an admin to
simply specify a username.

I also added the lock file checks to the existing `gitlab:repo:check`
task which goes through all projects. 

See merge request !2080
2015-12-15 18:36:28 +00:00
Drew Blessing f8bf6c4b2c [ci skip] Add user repository integrity check rake task 2015-12-14 15:27:14 -06:00
Stan Hu 9c5d8079a3 Bump Redis requirement to 2.8 for Sidekiq 4 requirements
Closes #3649

[ci skip]
2015-12-12 07:51:50 -08:00
Stan Hu 1d410ac96a Update project repository size and commit count during import:repos task
Closes #3848
2015-12-08 09:08:22 -08:00
Douwe Maan 033947de90 Merge branch 'sync-all-repos' into 'master'
Sync all repos

Scripts and documentation for moving repos, used on gitlab.com.

See merge request !1439
2015-12-08 16:13:59 +00:00
Jacob Vosmaer 23f383ef69 Detect project and namespace changes in list:repos 2015-12-08 16:06:06 +01:00
Jacob Vosmaer 6d2be0212c Merge branch 'master' into sync-all-repos 2015-12-08 12:35:54 +01:00
Zeger-Jan van de Weg 3da32ef7d8 Merge branch 'master' into rake-tasks-git 2015-12-07 12:06:20 +01:00
Robert Speicher ec002e8026 Remove usage of Colored 2015-11-24 19:20:23 -05:00
Zeger-Jan van de Weg 2f127cb86b Merge branch 'master' into rake-tasks-git 2015-11-24 14:59:31 +01:00
Marin Jankovski 3cc2b48a82 Backup LFS objects same as any upload. 2015-11-19 10:43:45 +01:00
Zeger-Jan van de Weg 9f548dffc3 Merge branch 'master' into rake-tasks-git 2015-11-11 13:22:00 +01:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Robert Speicher d09d62b6b8 Replace all usages of git command with configurable binary path
Closes #3311
2015-11-03 17:11:09 -05:00
Benny Schimmer d02a467d64 Fix regex in redis version check 2015-10-19 22:14:22 +02:00
Zeger-Jan van de WegandZeger-Jan van de Weg 8db063b579 Scalable way of requesting all repos 2015-10-14 19:11:09 +02:00
Zeger-Jan van de Weg 54e6c0045b Added three rake tasks for repository maintainance
Tasks added:
gitlab:git:repack
gitlab:git:gc
gitlab:git:prune
2015-10-14 19:11:09 +02:00
Douwe Maan 712d17684b Make Reply by email easier to configure 2015-10-13 13:10:49 +02:00
Jacob Vosmaer 6e1ec3b9af Merge branch 'rs-2fa-task' into 'master'
Add task to disable 2FA for all users

Addresses #2971 

See merge request !1532
2015-10-09 08:04:34 +00:00