Commit Graph

454 Commits

Author SHA1 Message Date
Valery Sizov 0c0caede85 Fix: Backup restore doesn't clear cache 2016-10-20 17:33:12 +03:00
Rémy Coutable 2650d5f895 Improve the branch existence and merge checks
Also add a safeguard for non-CI env.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-13 17:42:06 +02:00
Rémy Coutable 069f2d3475 Draft a quick CE->EE merge check rake task
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-13 17:42:05 +02:00
Achilleas Pipinellis 38978fa53f Merge branch 'docs/refactor-reply-by-email' into 'master'
Move reply by email docs to a new location

## What does this MR do?

Move reply by email docs to a new location.

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/3349

## Moving docs to a new location?

See the guidelines: http://docs.gitlab.com/ce/development/doc_styleguide.html#changing-document-location

- [ ] Make sure the old link is not removed and has its contents replaced with a link to the new location.
- [ ] Make sure internal links pointing to the document in question are not broken.
- [ ] Search and replace any links referring to old docs in GitLab Rails app, specifically under the `app/views/` directory.
- [ ] If working on CE, submit an MR to EE with the changes as well.

See merge request !6517
2016-10-11 13:27:23 +00:00
Rémy Coutable ebba491493
Add a new gitlab:users:clear_all_authentication_tokens task
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-11 10:21:18 +02:00
Justin DiPierro fe46e4eb35 Load Github::Shell's secret token from file on initialization instead of every request. 2016-10-06 11:22:37 -04:00
Achilleas Pipinellis dffd33252f Move reply by email docs to a new location
[ci skip]
2016-09-25 11:55:14 +02:00
bogdanvlviv 96ebc8c4f7 Use `File::exist?` instead of `File::exists?`
Since version ruby-2.2.0, method `File::exists?` is deprecated.
2016-08-11 13:54:45 +03:00
Robert Speicher 12e93d6f4b Rename `run` task helper method to prevent conflict with StateMachine
This prevents the following message from appearing whenever running a
Rake task:

    Instance method "run" is already defined in Object, use generic
    helper instead or set StateMachines::Machine.ignore_method_conflicts
    = true.
2016-08-09 18:31:51 -05:00
Herminio Torres f15ed5f0a5
Fix Rename `add_users_into_project` and `projects_ids`
We never add things `into` projects, we just add them `to` projects. So how about we rename this to `add_users_to_project`.

Rename `projects_ids` to `project_ids` by following the convention of rails.
2016-08-04 08:55:50 -03:00
Stan Hu 8a62f4e7d4 Update the gitlab-shell version in the tmp/tests directory to the right version
Previously the gitlab-shell version would never be updated if the directory
existed via the `gitlab🐚install` Rake task. This could lead to
incompatibility issues or random errors.
2016-08-03 11:39:19 -07:00
Drew Blessing cfd103dbb5 Disable MySQL foreign key checks before dropping all tables 2016-07-25 21:16:54 -05:00
Robert Speicher cf6de7dae9 Merge branch 'migration-downtime-tags' into 'master'
Added checks for migration downtime

This adds a set of checks that check/list which migrations require downtime (or not). It also comes with a CI task that fails should a migration not be tagged properly.

Fixes #14545

See merge request !4911
2016-07-20 17:03:04 +00:00
M. Ricketts 6d324f082e Use limit parameter rather than hardcoded value 2016-07-20 16:37:40 +02:00
Yorick Peterse a8bfe20d0d
Added checks for migration downtime
These new checks can be used to check if migrations require downtime or
not (as tagged by their authors). In CI this compares the current branch
with master so migrations added by merge requests are automatically
verified.

To check the migrations added since a Git reference simply run:

    bundle exec rake gitlab:db:downtime_check[GIT_REF]
2016-07-20 12:41:56 +02:00
Yorick Peterse 499cdf1d19
Added Rake task for tracking deployments
This simply inserts the current GitLab version in the "deployments"
measurement.

Fixes gitlab-com/infrastructure#98
2016-07-19 13:21:09 +02:00
Rémy Coutable 0144dce7ee Merge branch 'fix_restore_warning' into 'master'
Fix restore warning message

## What does this MR do?

Fix the restore Rake task so it properly outputs the database warning. This is a pretty important warning and it was not even being output. After this fix, the output looks like the screenshot below.

![Screen_Shot_2016-06-28_at_3.53.46_PM](/uploads/d250189d39fcacd0c8ec0aacf9cd930d/Screen_Shot_2016-06-28_at_3.53.46_PM.png)

See merge request !4980
2016-06-30 17:07:52 +00:00
Alejandro Rodríguez 20b9bb2029 Create (if necessary) and link the gitlab-shell secret file on the rake install task 2016-06-29 22:30:33 -04:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Drew Blessing 3ce174c370 Fix restore warning message 2016-06-28 15:54:40 -05:00
James Lopez 3a7eb38a78 added nice to have - rake task and some changes to docs 2016-06-21 19:23:21 +02:00
Z.J. van de Weg bbfd62bc34 fixup! override content method 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 483dc62eaa Incorporate review 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 96ae6099dd Run rake gitlab:update_templates 2016-06-20 14:48:28 -05:00
Z.J. van de Weg 620d014aef Implement backend gitlab ci dropdown
This commit builds on the groundwork in
ee008e300b1ec0abcc90e6a30816ec0754cea0dd, which refactored the backend
so the same code could be used for new dropdowns. In this commit its
used for templates for the `.gitlab-ci.yml` files.
2016-06-20 14:48:28 -05:00
ZJ van de Weg 27bf7ae59e Refactor Gitlab::Gitignores 2016-06-20 14:48:28 -05: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 Weg 79620c501d Update API and fetching task 2016-05-20 15:58:36 -05:00
Zeger-Jan van de Weg e166a8022a Backend for a gitignores dropdown 2016-05-20 15:58:36 -05:00
Jazz 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