Skip to content
Snippets Groups Projects
Commit 0f8c2334 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent ccaa9448
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 48 deletions
Loading
Loading
@@ -63,7 +63,7 @@ merge request from the UI, until you make all relevant jobs pass.
 
When this setting is enabled, a merge request is prevented from being merged if there is no pipeline. This may conflict with some use cases where [`only/except`](../../../ci/yaml/README.md#onlyexcept-advanced) rules are used and they don't generate any pipelines.
 
Users that expect to be able to merge a merge request in this scenario should ensure that [there is always a pipeline](https://gitlab.com/gitlab-org/gitlab-foss/issues/54226) and that it's succesful.
Users that expect to be able to merge a merge request in this scenario should ensure that [there is always a pipeline](https://gitlab.com/gitlab-org/gitlab-foss/issues/54226) and that it's successful.
 
For example, to that on merge requests there is always a passing job even though `only/except` rules may not generate any other jobs:
 
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@ repository. There, you will have full [Owner](../../permissions.md)
access, so you can set it up as you please.
 
CAUTION: **CAUTION:**
From GitLab 12.6 onwards, if the [visibility of an upstream project is reduced](../../../public_access/public_access.md#reducing-visibility)
From GitLab 12.6 onward, if the [visibility of an upstream project is reduced](../../../public_access/public_access.md#reducing-visibility)
in any way, the fork relationship with all its forks will be removed.
 
CAUTION: **Caution:**
Loading
Loading
Loading
Loading
@@ -49,7 +49,7 @@ After making your changes, click the **Commit** button in the bottom left to
review the list of changed files. If you're using GitLab 12.6 or older versions,
click on each file to review the changes and tick the item to stage a file.
 
From [GitLab 12.7 onwards](https://gitlab.com/gitlab-org/gitlab/issues/33441),
From [GitLab 12.7 onward](https://gitlab.com/gitlab-org/gitlab/issues/33441),
all your files will be automatically staged. You still have the option to unstage
changes in case you want to submit them in multiple smaller commits. To unstage
a change, simply click the **Unstage** button when a staged file is open, or click
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ namespace :cache do
REDIS_CLEAR_BATCH_SIZE = 1000 # There seems to be no speedup when pushing beyond 1,000
REDIS_SCAN_START_STOP = '0'.freeze # Magic value, see http://redis.io/commands/scan
 
desc "GitLab | Clear redis cache"
desc "GitLab | Cache | Clear redis cache"
task redis: :environment do
Gitlab::Redis::Cache.with do |redis|
cache_key_pattern = %W[#{Gitlab::Redis::Cache::CACHE_NAMESPACE}*
Loading
Loading
namespace :ci do
namespace :cleanup do
desc "GitLab CI | Clean running builds"
desc "GitLab | CI | Clean running builds"
task builds: :environment do
Ci::Build.running.update_all(status: 'canceled')
end
Loading
Loading
task dev: ["dev:setup"]
 
namespace :dev do
desc "GitLab | Setup developer environment (db, fixtures)"
desc "GitLab | Dev | Setup developer environment (db, fixtures)"
task setup: :environment do
ENV['force'] = 'yes'
Rake::Task["gitlab:setup"].invoke
Loading
Loading
@@ -12,7 +12,7 @@ namespace :dev do
Rake::Task["gitlab:shell:setup"].invoke
end
 
desc "GitLab | Eager load application"
desc "GitLab | Dev | Eager load application"
task load: :environment do
Rails.configuration.eager_load = true
Rails.application.eager_load!
Loading
Loading
require 'logger'
require 'resolv-replace'
 
desc "GitLab | Migrate files for artifacts to comply with new storage format"
desc 'GitLab | Artifacts | Migrate files for artifacts to comply with new storage format'
namespace :gitlab do
namespace :artifacts do
task migrate: :environment do
Loading
Loading
Loading
Loading
@@ -3,18 +3,18 @@ require 'active_record/fixtures'
namespace :gitlab do
namespace :backup do
# Create backup of GitLab system
desc "GitLab | Create a backup of the GitLab system"
desc 'GitLab | Backup | Create a backup of the GitLab system'
task create: :gitlab_environment do
warn_user_is_not_gitlab
 
Rake::Task["gitlab:backup:db:create"].invoke
Rake::Task["gitlab:backup:repo:create"].invoke
Rake::Task["gitlab:backup:uploads:create"].invoke
Rake::Task["gitlab:backup:builds:create"].invoke
Rake::Task["gitlab:backup:artifacts:create"].invoke
Rake::Task["gitlab:backup:pages:create"].invoke
Rake::Task["gitlab:backup:lfs:create"].invoke
Rake::Task["gitlab:backup:registry:create"].invoke
Rake::Task['gitlab:backup:db:create'].invoke
Rake::Task['gitlab:backup:repo:create'].invoke
Rake::Task['gitlab:backup:uploads:create'].invoke
Rake::Task['gitlab:backup:builds:create'].invoke
Rake::Task['gitlab:backup:artifacts:create'].invoke
Rake::Task['gitlab:backup:pages:create'].invoke
Rake::Task['gitlab:backup:lfs:create'].invoke
Rake::Task['gitlab:backup:registry:create'].invoke
 
backup = Backup::Manager.new(progress)
backup.pack
Loading
Loading
@@ -28,7 +28,7 @@ namespace :gitlab do
end
 
# Restore backup of GitLab system
desc 'GitLab | Restore a previously created backup'
desc 'GitLab | Backup | Restore a previously created backup'
task restore: :gitlab_environment do
warn_user_is_not_gitlab
 
Loading
Loading
namespace :gitlab do
namespace :import do
desc "GitLab | Add all users to all projects (admin users are added as maintainers)"
desc "GitLab | Import | Add all users to all projects (admin users are added as maintainers)"
task all_users_to_all_projects: :environment do |t, args|
user_ids = User.where(admin: false).pluck(:id)
admin_ids = User.where(admin: true).pluck(:id)
Loading
Loading
@@ -13,7 +13,7 @@ namespace :gitlab do
ProjectMember.add_users_to_projects(project_ids, admin_ids, ProjectMember::MAINTAINER)
end
 
desc "GitLab | Add a specific user to all projects (as a developer)"
desc "GitLab | Import | Add a specific user to all projects (as a developer)"
task :user_to_projects, [:email] => :environment do |t, args|
user = User.find_by(email: args.email)
project_ids = Project.pluck(:id)
Loading
Loading
@@ -21,7 +21,7 @@ namespace :gitlab do
ProjectMember.add_users_to_projects(project_ids, Array.wrap(user.id), ProjectMember::DEVELOPER)
end
 
desc "GitLab | Add all users to all groups (admin users are added as owners)"
desc "GitLab | Import | Add all users to all groups (admin users are added as owners)"
task all_users_to_all_groups: :environment do |t, args|
user_ids = User.where(admin: false).pluck(:id)
admin_ids = User.where(admin: true).pluck(:id)
Loading
Loading
@@ -35,7 +35,7 @@ namespace :gitlab do
end
end
 
desc "GitLab | Add a specific user to all groups (as a developer)"
desc "GitLab | Import | Add a specific user to all groups (as a developer)"
task :user_to_groups, [:email] => :environment do |t, args|
user = User.find_by_email args.email
groups = Group.all
Loading
Loading
Loading
Loading
@@ -5,35 +5,35 @@ namespace :gitlab do
end
 
namespace :app do
desc 'GitLab | Check the configuration of the GitLab Rails app'
desc 'GitLab | App | Check the configuration of the GitLab Rails app'
task check: :gitlab_environment do
SystemCheck::RakeTask::AppTask.run!
end
end
 
namespace :gitlab_shell do
desc "GitLab | Check the configuration of GitLab Shell"
desc 'GitLab | GitLab Shell | Check the configuration of GitLab Shell'
task check: :gitlab_environment do
SystemCheck::RakeTask::GitlabShellTask.run!
end
end
 
namespace :gitaly do
desc 'GitLab | Check the health of Gitaly'
desc 'GitLab | Gitaly | Check the health of Gitaly'
task check: :gitlab_environment do
SystemCheck::RakeTask::GitalyTask.run!
end
end
 
namespace :sidekiq do
desc "GitLab | Check the configuration of Sidekiq"
desc 'GitLab | Sidekiq | Check the configuration of Sidekiq'
task check: :gitlab_environment do
SystemCheck::RakeTask::SidekiqTask.run!
end
end
 
namespace :incoming_email do
desc "GitLab | Check the configuration of Reply by email"
desc 'GitLab | Incoming Email | Check the configuration of Reply by email'
task check: :gitlab_environment do
SystemCheck::RakeTask::IncomingEmailTask.run!
end
Loading
Loading
@@ -48,17 +48,17 @@ namespace :gitlab do
end
 
namespace :orphans do
desc 'Gitlab | Check for orphaned namespaces and repositories'
desc 'Gitlab | Orphans | Check for orphaned namespaces and repositories'
task check: :gitlab_environment do
SystemCheck::RakeTask::OrphansTask.run!
end
 
desc 'GitLab | Check for orphaned namespaces in the repositories path'
desc 'GitLab | Orphans | Check for orphaned namespaces in the repositories path'
task check_namespaces: :gitlab_environment do
SystemCheck::RakeTask::Orphans::NamespaceTask.run!
end
 
desc 'GitLab | Check for orphaned repositories in the repositories path'
desc 'GitLab | Orphans | Check for orphaned repositories in the repositories path'
task check_repositories: :gitlab_environment do
SystemCheck::RakeTask::Orphans::RepositoryTask.run!
end
Loading
Loading
namespace :gitlab do
namespace :db do
desc 'GitLab | Manually insert schema migration version'
desc 'GitLab | DB | Manually insert schema migration version'
task :mark_migration_complete, [:version] => :environment do |_, args|
unless args[:version]
puts "Must specify a migration version as an argument".color(:red)
Loading
Loading
@@ -22,7 +22,7 @@ namespace :gitlab do
end
end
 
desc 'Drop all tables'
desc 'GitLab | DB | Drop all tables'
task drop_tables: :environment do
connection = ActiveRecord::Base.connection
 
Loading
Loading
@@ -41,7 +41,7 @@ namespace :gitlab do
tables.each { |t| connection.execute("DROP TABLE IF EXISTS #{connection.quote_table_name(t)} CASCADE") }
end
 
desc 'Configures the database by running migrate, or by loading the schema and seeding if needed'
desc 'GitLab | DB | Configures the database by running migrate, or by loading the schema and seeding if needed'
task configure: :environment do
# Check if we have existing db tables
# The schema_migrations table will still exist if drop_tables was called
Loading
Loading
@@ -55,7 +55,7 @@ namespace :gitlab do
end
end
 
desc 'Checks if migrations require downtime or not'
desc 'GitLab | DB | Checks if migrations require downtime or not'
task :downtime_check, [:ref] => :environment do |_, args|
abort 'You must specify a Git reference to compare with' unless args[:ref]
 
Loading
Loading
@@ -71,7 +71,7 @@ namespace :gitlab do
Gitlab::DowntimeCheck.new.check_and_print(migrations)
end
 
desc 'Sets up EE specific database functionality'
desc 'GitLab | DB | Sets up EE specific database functionality'
 
if Gitlab.ee?
task setup_ee: %w[geo:db:drop geo:db:create geo:db:schema:load geo:db:migrate]
Loading
Loading
namespace :gitlab do
namespace :exclusive_lease do
desc 'GitLab | Clear existing exclusive leases for specified scope (default: *)'
desc 'GitLab | Exclusive Lease | Clear existing exclusive leases for specified scope (default: *)'
task :clear, [:scope] => [:environment] do |_, args|
args[:scope].nil? ? Gitlab::ExclusiveLease.reset_all! : Gitlab::ExclusiveLease.reset_all!(args[:scope])
puts 'All exclusive lease entries were removed.'
Loading
Loading
namespace :gitlab do
namespace :gitaly do
desc "GitLab | Install or upgrade gitaly"
desc 'GitLab | Gitaly | Install or upgrade gitaly'
task :install, [:dir, :storage_path, :repo] => :gitlab_environment do |t, args|
warn_user_is_not_gitlab
 
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ namespace :gitlab do
)
 
namespace :graphql do
desc 'GitLab | Generate GraphQL docs'
desc 'GitLab | GraphQL | Generate GraphQL docs'
task compile_docs: :environment do
renderer = Gitlab::Graphql::Docs::Renderer.new(GitlabSchema.graphql_definition, render_options)
 
Loading
Loading
@@ -30,7 +30,7 @@ namespace :gitlab do
puts "Documentation compiled."
end
 
desc 'GitLab | Check if GraphQL docs are up to date'
desc 'GitLab | GraphQL | Check if GraphQL docs are up to date'
task check_docs: :environment do
renderer = Gitlab::Graphql::Docs::Renderer.new(GitlabSchema.graphql_definition, render_options)
 
Loading
Loading
@@ -44,7 +44,7 @@ namespace :gitlab do
end
end
 
desc 'GitLab | Check if GraphQL schemas are up to date'
desc 'GitLab | GraphQL | Check if GraphQL schemas are up to date'
task check_schema: :environment do
idl_doc = File.read(Rails.root.join(OUTPUT_DIR, 'gitlab_schema.graphql'))
json_doc = File.read(Rails.root.join(OUTPUT_DIR, 'gitlab_schema.json'))
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ namespace :gitlab do
# Notes:
# * The project owner will set to the first administator of the system
# * Existing projects will be skipped
desc "GitLab | Import bare repositories from repositories -> storages into GitLab project instance"
desc "GitLab | Import | Import bare repositories from repositories -> storages into GitLab project instance"
task :repos, [:import_path] => :environment do |_t, args|
unless args.import_path
puts 'Please specify an import path that contains the repositories'.color(:red)
Loading
Loading
namespace :gitlab do
namespace :import_export do
desc "GitLab | Show Import/Export version"
desc 'GitLab | Import/Export | Show Import/Export version'
task version: :environment do
puts "Import/Export v#{Gitlab::ImportExport.version}"
end
 
desc "GitLab | Display exported DB structure"
desc 'GitLab | Import/Export | Display exported DB structure'
task data: :environment do
puts Gitlab::ImportExport::Config.new.to_h['project_tree'].to_yaml(SortKeys: true)
end
 
desc 'GitLab | Bumps the Import/Export version in fixtures and project templates'
desc 'GitLab | Import/Export | Bumps the Import/Export version in fixtures and project templates'
task bump_version: :environment do
archives = Dir['vendor/project_templates/*.tar.gz']
archives.push('spec/features/projects/import_export/test_project_export.tar.gz')
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@
#
namespace :gitlab do
namespace :import_export do
desc 'EXPERIMENTAL | Import large project archives'
desc 'GitLab | Import/Export | EXPERIMENTAL | Import large project archives'
task :import, [:username, :namespace_path, :project_path, :archive_path] => :gitlab_environment do |_t, args|
# Load it here to avoid polluting Rake tasks with Sidekiq test warnings
require 'sidekiq/testing'
Loading
Loading
namespace :gitlab do
namespace :env do
desc "GitLab | Show information about GitLab and its environment"
desc 'GitLab | Env | Show information about GitLab and its environment'
task info: :gitlab_environment do
# check if there is an RVM environment
rvm_version = run_and_match(%w(rvm --version), /[\d\.]+/).try(:to_s)
Loading
Loading
require 'logger'
 
desc "GitLab | Migrate LFS objects to remote storage"
desc "GitLab | LFS | Migrate LFS objects to remote storage"
namespace :gitlab do
namespace :lfs do
task migrate: :environment do
Loading
Loading
# frozen_string_literal: true
 
namespace :metrics do
desc "GitLab | Setup common metrics"
desc "GitLab | Metrics | Setup common metrics"
task setup_common_metrics: :gitlab_environment do
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment