New upstream version 12.3.9
This commit is contained in:
parent
715c4ade07
commit
d1a7d1f41e
13795 changed files with 677937 additions and 190871 deletions
45
.babelrc.js
45
.babelrc.js
|
@ -1,45 +0,0 @@
|
|||
const BABEL_ENV = process.env.BABEL_ENV || process.env.NODE_ENV || null;
|
||||
|
||||
const presets = [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false,
|
||||
targets: {
|
||||
ie: '11',
|
||||
},
|
||||
},
|
||||
],
|
||||
];
|
||||
|
||||
// include stage 3 proposals
|
||||
const plugins = [
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'@babel/plugin-syntax-import-meta',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-json-strings',
|
||||
'@babel/plugin-proposal-private-methods',
|
||||
];
|
||||
|
||||
// add code coverage tooling if necessary
|
||||
if (BABEL_ENV === 'coverage') {
|
||||
plugins.push([
|
||||
'babel-plugin-istanbul',
|
||||
{
|
||||
exclude: ['spec/javascripts/**/*', 'app/assets/javascripts/locale/**/app.js'],
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
// add rewire support when running tests
|
||||
if (BABEL_ENV === 'karma' || BABEL_ENV === 'coverage') {
|
||||
plugins.push('babel-plugin-rewire');
|
||||
}
|
||||
|
||||
// Jest is running in node environment
|
||||
if (BABEL_ENV === 'jest') {
|
||||
plugins.push('transform-es2015-modules-commonjs');
|
||||
plugins.push('dynamic-import-node');
|
||||
}
|
||||
|
||||
module.exports = { presets, plugins };
|
|
@ -6,35 +6,35 @@ engines:
|
|||
enabled: true
|
||||
config:
|
||||
languages:
|
||||
- ruby
|
||||
- javascript
|
||||
- ruby
|
||||
- javascript
|
||||
ratings:
|
||||
paths:
|
||||
- Gemfile.lock
|
||||
- "**.erb"
|
||||
- "**.haml"
|
||||
- "**.rb"
|
||||
- "**.rhtml"
|
||||
- "**.slim"
|
||||
- "**.inc"
|
||||
- "**.js"
|
||||
- "**.jsx"
|
||||
- "**.module"
|
||||
- Gemfile.lock
|
||||
- "**.erb"
|
||||
- "**.haml"
|
||||
- "**.rb"
|
||||
- "**.rhtml"
|
||||
- "**.slim"
|
||||
- "**.inc"
|
||||
- "**.js"
|
||||
- "**.jsx"
|
||||
- "**.module"
|
||||
exclude_paths:
|
||||
- config/
|
||||
- db/
|
||||
- features/
|
||||
- node_modules/
|
||||
- spec/
|
||||
- vendor/
|
||||
- .yarn-cache/
|
||||
- tmp/
|
||||
- builds/
|
||||
- coverage/
|
||||
- public/
|
||||
- shared/
|
||||
- webpack-report/
|
||||
- log/
|
||||
- backups/
|
||||
- coverage-javascript/
|
||||
- plugins/
|
||||
- config/
|
||||
- db/
|
||||
- features/
|
||||
- node_modules/
|
||||
- spec/
|
||||
- vendor/
|
||||
- .yarn-cache/
|
||||
- tmp/
|
||||
- builds/
|
||||
- coverage/
|
||||
- public/
|
||||
- shared/
|
||||
- webpack-report/
|
||||
- log/
|
||||
- backups/
|
||||
- coverage-javascript/
|
||||
- plugins/
|
||||
|
|
82
.dockerignore
Normal file
82
.dockerignore
Normal file
|
@ -0,0 +1,82 @@
|
|||
# `build_from_dir` can't find Dockerfile when `.dockerignore` is "*"
|
||||
# See https://github.com/swipely/docker-api/issues/484
|
||||
# Ignore all folders except qa/, config/initializers and the root of lib/ since
|
||||
# the files we need to build the QA image are in these folders.
|
||||
# Following are the files we need:
|
||||
# - ./config/initializers/0_inject_enterprise_edition_module.rb
|
||||
# - ./ee/app/models/license.rb
|
||||
# - ./lib/gitlab.rb
|
||||
# - ./qa/
|
||||
# - ./INSTALLATION_TYPE
|
||||
# - ./VERSION
|
||||
|
||||
/.git/
|
||||
/app/
|
||||
/bin/
|
||||
/builds/
|
||||
/changelogs/
|
||||
/config/environments/
|
||||
/config/helpers/
|
||||
/config/knative/
|
||||
/config/locales/
|
||||
/config/prometheus/
|
||||
/config/routes/
|
||||
/danger/
|
||||
/db/
|
||||
/doc/
|
||||
/docker/
|
||||
/ee/bin/
|
||||
/ee/changelogs/
|
||||
/ee/config/
|
||||
/ee/db/
|
||||
/ee/fixtures/
|
||||
/ee/lib/
|
||||
/ee/locale/
|
||||
/ee/spec/
|
||||
/fixtures/
|
||||
/templates/
|
||||
/lint/
|
||||
/lib/api/
|
||||
/lib/assets/
|
||||
/lib/backup/
|
||||
/lib/banzai/
|
||||
/lib/bitbucket/
|
||||
/lib/server/
|
||||
/lib/constraints/
|
||||
/lib/registry/
|
||||
/lib/policy/
|
||||
/lib/feature/
|
||||
/lib/flowdock/
|
||||
/lib/generators/
|
||||
/lib/gitaly/
|
||||
/lib/gitlab/
|
||||
/lib/api/
|
||||
/lib/token/
|
||||
/lib/mattermost/
|
||||
/lib/teams/
|
||||
/lib/storage/
|
||||
/lib/auth/
|
||||
/lib/peek/
|
||||
/lib/prometheus/
|
||||
/lib/quality/
|
||||
/lib/rouge/
|
||||
/lib/flaky/
|
||||
/lib/zip/
|
||||
/lib/sentry/
|
||||
/lib/serializers/
|
||||
/lib/support/
|
||||
/lib/check/
|
||||
/lib/tasks/
|
||||
/locale/
|
||||
/log/
|
||||
/modules/
|
||||
/node_modules/
|
||||
/plugins/
|
||||
/public/
|
||||
/rubocop/
|
||||
/scripts/
|
||||
/shared/
|
||||
/spec/
|
||||
/symbol/
|
||||
/tmp/
|
||||
/vendor/
|
|
@ -9,5 +9,6 @@
|
|||
/scripts/
|
||||
/tmp/
|
||||
/vendor/
|
||||
jest.config.js
|
||||
karma.config.js
|
||||
webpack.config.js
|
||||
|
|
|
@ -5,17 +5,19 @@ globals:
|
|||
gl: false
|
||||
gon: false
|
||||
localStorage: false
|
||||
IS_EE: false
|
||||
plugins:
|
||||
- import
|
||||
- html
|
||||
- "@gitlab/i18n"
|
||||
- "@gitlab/vue-i18n"
|
||||
settings:
|
||||
html/html-extensions:
|
||||
- '.html'
|
||||
- '.html.raw'
|
||||
import/resolver:
|
||||
webpack:
|
||||
config: './config/webpack.config.js'
|
||||
rules:
|
||||
"@gitlab/i18n/no-non-i18n-strings": error
|
||||
"@gitlab/vue-i18n/no-bare-strings": error
|
||||
"@gitlab/vue-i18n/no-bare-attribute-strings": error
|
||||
import/no-commonjs: error
|
||||
no-underscore-dangle:
|
||||
- error
|
||||
|
@ -34,3 +36,8 @@ rules:
|
|||
vue/no-use-v-if-with-v-for: off
|
||||
vue/no-v-html: off
|
||||
vue/use-v-on-exact: off
|
||||
overrides:
|
||||
files:
|
||||
- '**/spec/**/*'
|
||||
rules:
|
||||
"@gitlab/i18n/no-non-i18n-strings": off
|
||||
|
|
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1,2 +1,3 @@
|
|||
VERSION merge=ours
|
||||
Dangerfile gitlab-language=ruby
|
||||
db/schema.rb merge=merge_db_schema
|
||||
|
|
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -59,25 +59,25 @@ eslint-report.html
|
|||
/public/uploads.*
|
||||
/public/uploads/
|
||||
/shared/artifacts/
|
||||
/spec/javascripts/fixtures/blob/pdf/
|
||||
/spec/javascripts/fixtures/blob/balsamiq/
|
||||
/rails_best_practices_output.html
|
||||
/tags
|
||||
/tmp/*
|
||||
/vendor/bundle/*
|
||||
/vendor/gitaly-ruby
|
||||
/builds*
|
||||
/shared/*
|
||||
/.gitlab_workhorse_secret
|
||||
/.gitlab_pages_shared_secret
|
||||
/webpack-report/
|
||||
/knapsack/
|
||||
/rspec_flaky/
|
||||
/locale/**/LC_MESSAGES
|
||||
/locale/**/*.time_stamp
|
||||
/.rspec
|
||||
/plugins/*
|
||||
/.gitlab_pages_secret
|
||||
/.gitlab_smime_key
|
||||
/.gitlab_smime_cert
|
||||
package-lock.json
|
||||
/junit_*.xml
|
||||
/coverage-frontend/
|
||||
jsdoc/
|
||||
**/tmp/rubocop_cache/**
|
||||
.overcommit.yml
|
||||
|
|
1096
.gitlab-ci.yml
1096
.gitlab-ci.yml
File diff suppressed because it is too large
Load diff
28
.gitlab/CODEOWNERS
Normal file
28
.gitlab/CODEOWNERS
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Backend Maintainers are the default for all ruby files
|
||||
*.rb @gitlab-org/maintainers/rails-backend
|
||||
*.rake @gitlab-org/maintainers/rails-backend
|
||||
|
||||
# Technical writing team are the default reviewers for everything in `doc/`
|
||||
/doc/ @axil @marcia @eread @mikelewis
|
||||
|
||||
# Frontend maintainers should see everything in `app/assets/`
|
||||
app/assets/ @ClemMakesApps @fatihacet @filipa @mikegreiling @timzallmann @kushalpandya @pslaughter
|
||||
*.scss @annabeldunstone @ClemMakesApps @fatihacet @filipa @mikegreiling @timzallmann @kushalpandya @pslaughter
|
||||
|
||||
# Database maintainers should review changes in `db/`
|
||||
db/ @gitlab-org/maintainers/database
|
||||
lib/gitlab/background_migration/ @gitlab-org/maintainers/database
|
||||
lib/gitlab/database/ @gitlab-org/maintainers/database
|
||||
lib/gitlab/sql/ @gitlab-org/maintainers/database
|
||||
lib/gitlab/github_import/ @gitlab-org/maintainers/database
|
||||
/ee/db/ @gitlab-org/maintainers/database
|
||||
|
||||
# Feature specific owners
|
||||
/ee/lib/gitlab/code_owners/ @reprazent
|
||||
/ee/lib/ee/gitlab/auth/ldap/ @dblessing @mkozono
|
||||
/lib/gitlab/auth/ldap/ @dblessing @mkozono
|
||||
/lib/gitlab/ci/templates/ @nolith @zj
|
||||
/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah
|
||||
/lib/gitlab/ci/templates/Security/ @plafoucriere @gonzoyumo @twoodham
|
||||
/ee/app/models/project_alias.rb @patrickbajao
|
||||
/ee/lib/api/project_aliases.rb @patrickbajao
|
|
@ -1,20 +0,0 @@
|
|||
# Backend Maintainers are the default for all ruby files
|
||||
*.rb @ayufan @dbalexandre @DouweM @dzaporozhets @godfat @grzesiek @nick.thomas @rspeicher @rymai @smcgivern
|
||||
*.rake @ayufan @dbalexandre @DouweM @dzaporozhets @godfat @grzesiek @nick.thomas @rspeicher @rymai @smcgivern
|
||||
|
||||
# Technical writing team are the default reviewers for everything in `doc/`
|
||||
/doc/ @axil @marcia
|
||||
|
||||
# Frontend maintainers should see everything in `app/assets/`
|
||||
app/assets/ @ClemMakesApps @fatihacet @filipa @iamphill @mikegreiling @timzallmann @kushalpandya
|
||||
*.scss @annabeldunstone @ClemMakesApps @fatihacet @filipa @iamphill @mikegreiling @timzallmann @kushalpandya
|
||||
|
||||
# Someone from the database team should review changes in `db/`
|
||||
db/ @abrandl @NikolayS
|
||||
|
||||
# Feature specific owners
|
||||
/ee/lib/gitlab/code_owners/ @reprazent
|
||||
/ee/lib/ee/gitlab/auth/ldap/ @dblessing @mkozono
|
||||
/lib/gitlab/auth/ldap/ @dblessing @mkozono
|
||||
/lib/gitlab/ci/templates/ @nolith @zj
|
||||
/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah
|
16
.gitlab/ci/cng.gitlab-ci.yml
Normal file
16
.gitlab/ci/cng.gitlab-ci.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
cloud-native-image:
|
||||
image: ruby:2.6-alpine
|
||||
dependencies: []
|
||||
stage: post-test
|
||||
allow_failure: true
|
||||
variables:
|
||||
GIT_DEPTH: "1"
|
||||
when: manual
|
||||
script:
|
||||
- install_gitlab_gem
|
||||
- CNG_PROJECT_PATH="gitlab-org/build/CNG" BUILD_TRIGGER_TOKEN=$CI_JOB_TOKEN ./scripts/trigger-build cng
|
||||
only:
|
||||
refs:
|
||||
- tags
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
69
.gitlab/ci/docs.gitlab-ci.yml
Normal file
69
.gitlab/ci/docs.gitlab-ci.yml
Normal file
|
@ -0,0 +1,69 @@
|
|||
.review-docs:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .only-docs-changes
|
||||
only:
|
||||
refs:
|
||||
- merge_requests
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
image: ruby:2.6-alpine
|
||||
stage: review
|
||||
dependencies: []
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
environment:
|
||||
name: review-docs/$CI_COMMIT_REF_SLUG
|
||||
# DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are CI variables
|
||||
# Discussion: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/14236/diffs#note_40140693
|
||||
url: http://$CI_ENVIRONMENT_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
|
||||
on_stop: review-docs-cleanup
|
||||
before_script:
|
||||
# We don't clone the repo by using GIT_STRATEGY: none and only download the
|
||||
# single script we need here so it's much faster than cloning.
|
||||
- apk add --update openssl
|
||||
- wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/trigger-build-docs
|
||||
- chmod 755 trigger-build-docs
|
||||
- gem install gitlab --no-document
|
||||
|
||||
# Always trigger a docs build in gitlab-docs only on docs-only branches.
|
||||
# Useful to preview the docs changes live.
|
||||
review-docs-deploy:
|
||||
extends: .review-docs
|
||||
script:
|
||||
- ./trigger-build-docs deploy
|
||||
when: manual
|
||||
|
||||
# Cleanup remote environment of gitlab-docs
|
||||
review-docs-cleanup:
|
||||
extends: .review-docs
|
||||
environment:
|
||||
name: review-docs/$CI_COMMIT_REF_SLUG
|
||||
action: stop
|
||||
script:
|
||||
- ./trigger-build-docs cleanup
|
||||
when: manual
|
||||
|
||||
docs lint:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-docs-changes
|
||||
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-docs-lint"
|
||||
stage: test
|
||||
dependencies: []
|
||||
script:
|
||||
- scripts/lint-doc.sh
|
||||
# Lint Markdown
|
||||
- markdownlint --config .markdownlint.json 'doc/**/*.md'
|
||||
# Prepare docs for build
|
||||
- mv doc/ /tmp/gitlab-docs/content/$DOCS_GITLAB_REPO_SUFFIX
|
||||
- cd /tmp/gitlab-docs
|
||||
# Build HTML from Markdown
|
||||
- bundle exec nanoc
|
||||
# Check the internal links
|
||||
- bundle exec nanoc check internal_links
|
||||
# Check the internal anchor links
|
||||
- bundle exec nanoc check internal_anchors
|
240
.gitlab/ci/frontend.gitlab-ci.yml
Normal file
240
.gitlab/ci/frontend.gitlab-ci.yml
Normal file
|
@ -0,0 +1,240 @@
|
|||
.assets-compile-cache:
|
||||
cache:
|
||||
paths:
|
||||
- vendor/ruby/
|
||||
- .yarn-cache/
|
||||
- tmp/cache/assets/sprockets
|
||||
|
||||
.gitlab:assets:compile-metadata:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
- .assets-compile-cache
|
||||
- .only-code-qa-changes
|
||||
image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-18.06.1
|
||||
stage: test
|
||||
dependencies: ["setup-test-env"]
|
||||
needs: ["setup-test-env"]
|
||||
services:
|
||||
- docker:19.03.0-dind
|
||||
variables:
|
||||
NODE_ENV: "production"
|
||||
RAILS_ENV: "production"
|
||||
SETUP_DB: "false"
|
||||
SKIP_STORAGE_VALIDATION: "true"
|
||||
WEBPACK_REPORT: "true"
|
||||
# we override the max_old_space_size to prevent OOM errors
|
||||
NODE_OPTIONS: --max_old_space_size=3584
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
cache:
|
||||
key: "assets-compile:production:vendor_ruby:.yarn-cache:tmp_cache_assets_sprockets:v6"
|
||||
artifacts:
|
||||
name: webpack-report
|
||||
expire_in: 31d
|
||||
paths:
|
||||
- webpack-report/
|
||||
- public/assets/
|
||||
script:
|
||||
- node --version
|
||||
- retry yarn install --frozen-lockfile --production --cache-folder .yarn-cache --prefer-offline
|
||||
- free -m
|
||||
- retry bundle exec rake gitlab:assets:compile
|
||||
- time scripts/build_assets_image
|
||||
- scripts/clean-old-cached-assets
|
||||
- rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here
|
||||
only:
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
- $CI_SERVER_HOST == "dev.gitlab.org"
|
||||
tags:
|
||||
- gitlab-org
|
||||
- docker
|
||||
|
||||
gitlab:assets:compile:
|
||||
extends: .gitlab:assets:compile-metadata
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
cache:
|
||||
policy: pull-push
|
||||
|
||||
gitlab:assets:compile pull-cache:
|
||||
extends: .gitlab:assets:compile-metadata
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
cache:
|
||||
policy: pull
|
||||
|
||||
.compile-assets-metadata:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
- .assets-compile-cache
|
||||
- .only-code-qa-changes
|
||||
- .use-pg
|
||||
stage: prepare
|
||||
script:
|
||||
- node --version
|
||||
- retry yarn install --frozen-lockfile --cache-folder .yarn-cache --prefer-offline
|
||||
- free -m
|
||||
- retry bundle exec rake gitlab:assets:compile
|
||||
- scripts/clean-old-cached-assets
|
||||
variables:
|
||||
# we override the max_old_space_size to prevent OOM errors
|
||||
NODE_OPTIONS: --max_old_space_size=3584
|
||||
cache:
|
||||
key: "assets-compile:test:vendor_ruby:.yarn-cache:tmp_cache_assets_sprockets:v6"
|
||||
artifacts:
|
||||
expire_in: 7d
|
||||
paths:
|
||||
- node_modules
|
||||
- public/assets
|
||||
|
||||
compile-assets:
|
||||
extends: .compile-assets-metadata
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
cache:
|
||||
policy: pull-push
|
||||
|
||||
compile-assets pull-cache:
|
||||
extends: .compile-assets-metadata
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
cache:
|
||||
policy: pull
|
||||
|
||||
.only-code-frontend-job-base:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
- .only-code-changes
|
||||
- .use-pg
|
||||
dependencies: ["compile-assets", "compile-assets pull-cache", "setup-test-env"]
|
||||
|
||||
karma:
|
||||
extends: .only-code-frontend-job-base
|
||||
variables:
|
||||
# we override the max_old_space_size to prevent OOM errors
|
||||
NODE_OPTIONS: --max_old_space_size=3584
|
||||
script:
|
||||
- export BABEL_ENV=coverage CHROME_LOG_FILE=chrome_debug.log
|
||||
- date
|
||||
- scripts/gitaly-test-spawn
|
||||
- date
|
||||
- bundle exec rake karma
|
||||
coverage: '/^Statements *: (\d+\.\d+%)/'
|
||||
artifacts:
|
||||
name: coverage-javascript
|
||||
expire_in: 31d
|
||||
when: always
|
||||
paths:
|
||||
- chrome_debug.log
|
||||
- coverage-javascript/
|
||||
- tmp/tests/frontend/
|
||||
reports:
|
||||
junit: junit_karma.xml
|
||||
|
||||
jest:
|
||||
extends: .only-code-frontend-job-base
|
||||
script:
|
||||
- scripts/gitaly-test-spawn
|
||||
- date
|
||||
- bundle exec rake frontend:fixtures
|
||||
- date
|
||||
- yarn jest --ci --coverage
|
||||
artifacts:
|
||||
name: coverage-frontend
|
||||
expire_in: 31d
|
||||
when: always
|
||||
paths:
|
||||
- coverage-frontend/
|
||||
- junit_jest.xml
|
||||
- tmp/tests/frontend/
|
||||
reports:
|
||||
junit: junit_jest.xml
|
||||
cache:
|
||||
key: jest
|
||||
paths:
|
||||
- tmp/jest/jest/
|
||||
policy: pull-push
|
||||
|
||||
.qa-job-base:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .only-code-qa-changes
|
||||
dependencies: []
|
||||
stage: test
|
||||
before_script:
|
||||
- cd qa/
|
||||
- bundle install
|
||||
|
||||
qa:internal:
|
||||
extends: .qa-job-base
|
||||
script:
|
||||
- bundle exec rspec
|
||||
|
||||
qa:selectors:
|
||||
extends: .qa-job-base
|
||||
script:
|
||||
- bundle exec bin/qa Test::Sanity::Selectors
|
||||
|
||||
.qa-frontend-node:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
dependencies: []
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- .yarn-cache/
|
||||
policy: pull-push
|
||||
script:
|
||||
- date
|
||||
- yarn install --frozen-lockfile --cache-folder .yarn-cache --prefer-offline
|
||||
- date
|
||||
- yarn run webpack-prod
|
||||
|
||||
qa-frontend-node:8:
|
||||
extends: .qa-frontend-node
|
||||
image: node:carbon
|
||||
|
||||
qa-frontend-node:10:
|
||||
extends: .qa-frontend-node
|
||||
image: node:dubnium
|
||||
|
||||
qa-frontend-node:latest:
|
||||
extends: .qa-frontend-node
|
||||
image: node:latest
|
||||
allow_failure: true
|
||||
|
||||
webpack-dev-server:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
dependencies: ["setup-test-env", "compile-assets", "compile-assets pull-cache"]
|
||||
variables:
|
||||
WEBPACK_MEMORY_TEST: "true"
|
||||
script:
|
||||
- node --version
|
||||
- node --expose-gc node_modules/.bin/webpack-dev-server --config config/webpack.config.js
|
125
.gitlab/ci/global.gitlab-ci.yml
Normal file
125
.gitlab/ci/global.gitlab-ci.yml
Normal file
|
@ -0,0 +1,125 @@
|
|||
.default-tags:
|
||||
tags:
|
||||
- gitlab-org
|
||||
|
||||
.default-retry:
|
||||
retry:
|
||||
max: 2 # This is confusing but this means "3 runs at max".
|
||||
when:
|
||||
- unknown_failure
|
||||
- api_failure
|
||||
- runner_system_failure
|
||||
|
||||
.default-before_script:
|
||||
before_script:
|
||||
- date
|
||||
- source scripts/utils.sh
|
||||
- source scripts/prepare_build.sh
|
||||
- date
|
||||
|
||||
# Jobs that only need to pull cache
|
||||
.default-cache:
|
||||
cache:
|
||||
key: "debian-stretch-ruby-2.6.3-node-12.x"
|
||||
paths:
|
||||
- vendor/ruby
|
||||
- .yarn-cache/
|
||||
- vendor/gitaly-ruby
|
||||
policy: pull
|
||||
|
||||
.default-only:
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- /^[\d-]+-stable(-ee)?$/
|
||||
- /^\d+-\d+-auto-deploy-\d+$/
|
||||
- merge_requests
|
||||
- tags
|
||||
|
||||
.only-code-changes:
|
||||
only:
|
||||
changes:
|
||||
- ".gitlab/ci/**/*"
|
||||
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
||||
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
||||
- ".csscomb.json"
|
||||
- "Dangerfile"
|
||||
- "Dockerfile.assets"
|
||||
- "*_VERSION"
|
||||
- "Gemfile{,.lock}"
|
||||
- "Rakefile"
|
||||
- "{babel.config,jest.config}.js"
|
||||
- "config.ru"
|
||||
- "{package.json,yarn.lock}"
|
||||
- "{app,bin,config,danger,db,ee,fixtures,haml_lint,lib,public,rubocop,scripts,spec,symbol,vendor}/**/*"
|
||||
- "doc/README.md" # Some RSpec test rely on this file
|
||||
|
||||
.only-qa-changes:
|
||||
only:
|
||||
changes:
|
||||
- ".dockerignore"
|
||||
- "qa/**/*"
|
||||
|
||||
.only-docs-changes:
|
||||
only:
|
||||
changes:
|
||||
- ".gitlab/route-map.yml"
|
||||
- "doc/**/*"
|
||||
- ".markdownlint.json"
|
||||
|
||||
.only-code-qa-changes:
|
||||
only:
|
||||
changes:
|
||||
- ".gitlab/ci/**/*"
|
||||
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
|
||||
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
|
||||
- ".csscomb.json"
|
||||
- "Dangerfile"
|
||||
- "Dockerfile.assets"
|
||||
- "*_VERSION"
|
||||
- "Gemfile{,.lock}"
|
||||
- "Rakefile"
|
||||
- "{babel.config,jest.config}.js"
|
||||
- "config.ru"
|
||||
- "{package.json,yarn.lock}"
|
||||
- "{app,bin,config,danger,db,ee,fixtures,haml_lint,lib,public,rubocop,scripts,spec,symbol,vendor}/**/*"
|
||||
- "doc/README.md" # Some RSpec test rely on this file
|
||||
- ".dockerignore"
|
||||
- "qa/**/*"
|
||||
|
||||
.only-review:
|
||||
only:
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
kubernetes: active
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
- /^\d+-\d+-auto-deploy-\d+$/
|
||||
|
||||
.only-review-schedules:
|
||||
only:
|
||||
refs:
|
||||
- schedules
|
||||
variables:
|
||||
- $REVIEW_APP_CLEANUP && $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
kubernetes: active
|
||||
|
||||
.use-pg:
|
||||
services:
|
||||
- name: postgres:9.6.14
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
- name: redis:alpine
|
||||
|
||||
.use-pg-10:
|
||||
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.6.3-golang-1.11-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
|
||||
services:
|
||||
- name: postgres:10.9
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
- name: redis:alpine
|
||||
|
||||
.only-ee:
|
||||
only:
|
||||
variables:
|
||||
- $CI_PROJECT_NAME == "gitlab"
|
||||
- $CI_PROJECT_NAME == "gitlab-ee" # Support former project name for forks/mirrors
|
55
.gitlab/ci/memory.gitlab-ci.yml
Normal file
55
.gitlab/ci/memory.gitlab-ci.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
.only-code-memory-job-base:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
- .only-code-changes
|
||||
|
||||
memory-static:
|
||||
extends: .only-code-memory-job-base
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
script:
|
||||
# Uses two different reports from the 'derailed_benchmars' gem.
|
||||
|
||||
# Loads each of gems in the Gemfile and checks how much memory they consume when they are required.
|
||||
# 'derailed_benchmarks' internally uses 'get_process_mem'
|
||||
- bundle exec derailed bundle:mem > tmp/memory_bundle_mem.txt
|
||||
- scripts/generate-gems-size-metrics-static tmp/memory_bundle_mem.txt >> 'tmp/memory_metrics.txt'
|
||||
|
||||
# Outputs detailed information about objects created while gems are loaded.
|
||||
# 'derailed_benchmarks' internally uses 'memory_profiler'
|
||||
- bundle exec derailed bundle:objects > tmp/memory_bundle_objects.txt
|
||||
- scripts/generate-gems-memory-metrics-static tmp/memory_bundle_objects.txt >> 'tmp/memory_metrics.txt'
|
||||
artifacts:
|
||||
paths:
|
||||
- tmp/memory_*.txt
|
||||
reports:
|
||||
metrics: tmp/memory_metrics.txt
|
||||
|
||||
# Show memory usage caused by invoking require per gem.
|
||||
# Unlike `memory-static`, it hits the app with one request to ensure that any last minute require-s have been called.
|
||||
# The application is booted in `production` environment.
|
||||
# All tests are run without a webserver (directly using Rack::Mock by default).
|
||||
memory-on-boot:
|
||||
extends:
|
||||
- .only-code-memory-job-base
|
||||
- .use-pg-10
|
||||
variables:
|
||||
NODE_ENV: "production"
|
||||
RAILS_ENV: "production"
|
||||
SETUP_DB: "true"
|
||||
SKIP_STORAGE_VALIDATION: "true"
|
||||
# we override the max_old_space_size to prevent OOM errors
|
||||
NODE_OPTIONS: --max_old_space_size=3584
|
||||
script:
|
||||
# Both bootsnap and derailed monkey-patch Kernel#require, which leads to circular dependency
|
||||
- ENABLE_BOOTSNAP=false PATH_TO_HIT="/users/sign_in" CUT_OFF=0.3 bundle exec derailed exec perf:mem >> 'tmp/memory_on_boot.txt'
|
||||
- scripts/generate-memory-metrics-on-boot tmp/memory_on_boot.txt >> 'tmp/memory_on_boot_metrics.txt'
|
||||
artifacts:
|
||||
paths:
|
||||
- tmp/memory_*.txt
|
||||
reports:
|
||||
metrics: tmp/memory_on_boot_metrics.txt
|
25
.gitlab/ci/pages.gitlab-ci.yml
Normal file
25
.gitlab/ci/pages.gitlab-ci.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
pages:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .only-code-qa-changes
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
stage: pages
|
||||
dependencies: ["coverage", "karma", "gitlab:assets:compile"]
|
||||
script:
|
||||
- mv public/ .public/
|
||||
- mkdir public/
|
||||
- mv coverage/ public/coverage-ruby/ || true
|
||||
- mv coverage-javascript/ public/coverage-javascript/ || true
|
||||
- mv webpack-report/ public/webpack-report/ || true
|
||||
- cp .public/assets/application-*.css public/application.css || true
|
||||
- cp .public/assets/application-*.css.gz public/application.css.gz || true
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
46
.gitlab/ci/qa.gitlab-ci.yml
Normal file
46
.gitlab/ci/qa.gitlab-ci.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
.package-and-qa-base:
|
||||
extends: .default-only
|
||||
image: ruby:2.6-alpine
|
||||
stage: qa
|
||||
dependencies: []
|
||||
variables:
|
||||
GIT_DEPTH: "1"
|
||||
retry: 0
|
||||
script:
|
||||
- source scripts/utils.sh
|
||||
- install_gitlab_gem
|
||||
- ./scripts/trigger-build omnibus
|
||||
only:
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
|
||||
package-and-qa-manual:
|
||||
extends:
|
||||
- .package-and-qa-base
|
||||
- .only-code-changes
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
when: manual
|
||||
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
|
||||
|
||||
package-and-qa-manual:master:
|
||||
extends:
|
||||
- .package-and-qa-base
|
||||
- .only-code-qa-changes
|
||||
only:
|
||||
refs:
|
||||
- master@gitlab-org/gitlab-foss
|
||||
- master@gitlab-org/gitlab
|
||||
when: manual
|
||||
needs: ["build-qa-image", "gitlab:assets:compile"]
|
||||
|
||||
package-and-qa:
|
||||
extends:
|
||||
- .package-and-qa-base
|
||||
- .only-qa-changes
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
|
||||
allow_failure: true
|
369
.gitlab/ci/rails.gitlab-ci.yml
Normal file
369
.gitlab/ci/rails.gitlab-ci.yml
Normal file
|
@ -0,0 +1,369 @@
|
|||
.only-master:
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
|
||||
.rake-exec:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
script:
|
||||
- bundle exec rake $CI_JOB_NAME
|
||||
|
||||
.only-code-rails-job-base:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
- .only-code-changes
|
||||
|
||||
.only-code-qa-rails-job-base:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
- .default-before_script
|
||||
- .only-code-qa-changes
|
||||
|
||||
.rspec-base:
|
||||
extends: .only-code-rails-job-base
|
||||
stage: test
|
||||
script:
|
||||
- JOB_NAME=( $CI_JOB_NAME )
|
||||
- TEST_TOOL=${JOB_NAME[0]}
|
||||
- TEST_LEVEL=${JOB_NAME[1]}
|
||||
- DATABASE=${JOB_NAME[2]}
|
||||
- export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
|
||||
- export KNAPSACK_GENERATE_REPORT=true KNAPSACK_LOG_LEVEL=debug KNAPSACK_TEST_DIR=spec
|
||||
- export SUITE_FLAKY_RSPEC_REPORT_PATH=${FLAKY_RSPEC_SUITE_REPORT_PATH}
|
||||
- export FLAKY_RSPEC_REPORT_PATH=rspec_flaky/all_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
|
||||
- export NEW_FLAKY_RSPEC_REPORT_PATH=rspec_flaky/new_${TEST_TOOL}_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
|
||||
- export FLAKY_RSPEC_GENERATE_REPORT=true
|
||||
- export CACHE_CLASSES=true
|
||||
- cp ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} ${KNAPSACK_REPORT_PATH}
|
||||
- '[[ -f $FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_REPORT_PATH}'
|
||||
- '[[ -f $NEW_FLAKY_RSPEC_REPORT_PATH ]] || echo "{}" > ${NEW_FLAKY_RSPEC_REPORT_PATH}'
|
||||
- scripts/gitaly-test-spawn
|
||||
- date
|
||||
- 'export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new.pattern(:${TEST_LEVEL})")'
|
||||
- mkdir -p tmp/memory_test
|
||||
- export MEMORY_TEST_PATH="tmp/memory_test/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_memory.csv"
|
||||
- knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag level:${TEST_LEVEL} --tag ~geo"
|
||||
- date
|
||||
artifacts:
|
||||
expire_in: 31d
|
||||
when: always
|
||||
paths:
|
||||
- coverage/
|
||||
- knapsack/
|
||||
- rspec_flaky/
|
||||
- rspec_profiling/
|
||||
- tmp/capybara/
|
||||
- tmp/memory_test/
|
||||
reports:
|
||||
junit: junit_rspec.xml
|
||||
|
||||
.rspec-base-pg:
|
||||
extends:
|
||||
- .rspec-base
|
||||
- .use-pg
|
||||
|
||||
.rspec-base-pg-10:
|
||||
extends:
|
||||
- .rspec-base
|
||||
- .use-pg-10
|
||||
|
||||
setup-test-env:
|
||||
extends:
|
||||
- .only-code-qa-rails-job-base
|
||||
- .use-pg
|
||||
stage: prepare
|
||||
script:
|
||||
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
|
||||
- scripts/gitaly-test-build # Do not use 'bundle exec' here
|
||||
artifacts:
|
||||
expire_in: 7d
|
||||
paths:
|
||||
- tmp/tests
|
||||
- config/secrets.yml
|
||||
- vendor/gitaly-ruby
|
||||
|
||||
rspec unit pg:
|
||||
extends: .rspec-base-pg
|
||||
parallel: 20
|
||||
|
||||
rspec integration pg:
|
||||
extends: .rspec-base-pg
|
||||
parallel: 6
|
||||
|
||||
rspec system pg:
|
||||
extends: .rspec-base-pg
|
||||
parallel: 24
|
||||
|
||||
rspec unit pg-10:
|
||||
extends:
|
||||
- .rspec-base-pg-10
|
||||
- .only-master
|
||||
parallel: 20
|
||||
|
||||
rspec integration pg-10:
|
||||
extends:
|
||||
- .rspec-base-pg-10
|
||||
- .only-master
|
||||
parallel: 6
|
||||
|
||||
rspec system pg-10:
|
||||
extends:
|
||||
- .rspec-base-pg-10
|
||||
- .only-master
|
||||
parallel: 24
|
||||
|
||||
rspec-fast-spec-helper:
|
||||
extends: .rspec-base-pg
|
||||
script:
|
||||
- bundle exec rspec spec/fast_spec_helper.rb
|
||||
|
||||
rspec quarantine pg:
|
||||
extends:
|
||||
- .rspec-base-pg
|
||||
- .only-master
|
||||
script:
|
||||
- export NO_KNAPSACK=1 CACHE_CLASSES=true
|
||||
- scripts/gitaly-test-spawn
|
||||
- bin/rspec --color --format documentation --tag quarantine -- spec/
|
||||
allow_failure: true
|
||||
|
||||
static-analysis:
|
||||
extends: .only-code-qa-rails-job-base
|
||||
dependencies: ["setup-test-env", "compile-assets", "compile-assets pull-cache"]
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
script:
|
||||
- scripts/static-analysis
|
||||
cache:
|
||||
key: "debian-stretch-ruby-2.6.3-and-rubocop"
|
||||
paths:
|
||||
- vendor/ruby
|
||||
- tmp/rubocop_cache
|
||||
policy: pull-push
|
||||
|
||||
downtime_check:
|
||||
extends:
|
||||
- .rake-exec
|
||||
- .only-code-changes
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
- tags
|
||||
variables:
|
||||
- $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/
|
||||
stage: test
|
||||
dependencies: ["setup-test-env"]
|
||||
needs: ["setup-test-env"]
|
||||
|
||||
.db-job-base:
|
||||
extends:
|
||||
- .only-code-rails-job-base
|
||||
- .use-pg
|
||||
stage: test
|
||||
dependencies: ["setup-test-env"]
|
||||
needs: ["setup-test-env"]
|
||||
|
||||
# DB migration, rollback, and seed jobs
|
||||
db:migrate:reset:
|
||||
extends: .db-job-base
|
||||
script:
|
||||
- bundle exec rake db:migrate:reset
|
||||
|
||||
db:check-schema:
|
||||
extends: .db-job-base
|
||||
script:
|
||||
- source scripts/schema_changed.sh
|
||||
|
||||
db:migrate-from-v11.11.0:
|
||||
extends: .db-job-base
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
script:
|
||||
- export PROJECT_TO_CHECKOUT="gitlab-foss"
|
||||
- export TAG_TO_CHECKOUT="v11.11.0"
|
||||
- '[[ ! -d "ee/" ]] || export PROJECT_TO_CHECKOUT="gitlab"'
|
||||
- '[[ ! -d "ee/" ]] || export TAG_TO_CHECKOUT="v11.11.0-ee"'
|
||||
- git fetch https://gitlab.com/gitlab-org/$PROJECT_TO_CHECKOUT.git $TAG_TO_CHECKOUT
|
||||
- git checkout -f FETCH_HEAD
|
||||
- sed -i "s/gem 'oj', '~> 2.17.4'//" Gemfile
|
||||
- sed -i "s/gem 'bootsnap', '~> 1.0.0'/gem 'bootsnap'/" Gemfile
|
||||
- bundle update google-protobuf grpc bootsnap
|
||||
- bundle install $BUNDLE_INSTALL_FLAGS
|
||||
- date
|
||||
- cp config/gitlab.yml.example config/gitlab.yml
|
||||
- bundle exec rake db:drop db:create db:schema:load db:seed_fu
|
||||
- date
|
||||
- git checkout -f $CI_COMMIT_SHA
|
||||
- bundle install $BUNDLE_INSTALL_FLAGS
|
||||
- date
|
||||
- . scripts/prepare_build.sh
|
||||
- date
|
||||
- bundle exec rake db:migrate
|
||||
|
||||
db:rollback:
|
||||
extends: .db-job-base
|
||||
script:
|
||||
- bundle exec rake db:migrate VERSION=20180101160629
|
||||
- bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true
|
||||
|
||||
gitlab:setup:
|
||||
extends: .db-job-base
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
script:
|
||||
# Manually clone gitlab-test and only seed this project in
|
||||
# db/fixtures/development/04_project.rb thanks to SIZE=1 below
|
||||
- git clone https://gitlab.com/gitlab-org/gitlab-test.git
|
||||
/home/git/repositories/gitlab-org/gitlab-test.git
|
||||
- scripts/gitaly-test-spawn
|
||||
- force=yes SIZE=1 FIXTURE_PATH="db/fixtures/development" bundle exec rake gitlab:setup
|
||||
artifacts:
|
||||
when: on_failure
|
||||
expire_in: 1d
|
||||
paths:
|
||||
- log/development.log
|
||||
|
||||
coverage:
|
||||
extends: .only-code-rails-job-base
|
||||
cache:
|
||||
policy: pull
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
stage: post-test
|
||||
script:
|
||||
- bundle exec scripts/merge-simplecov
|
||||
- bundle exec scripts/gather-test-memory-data
|
||||
coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
|
||||
artifacts:
|
||||
name: coverage
|
||||
expire_in: 31d
|
||||
paths:
|
||||
- coverage/index.html
|
||||
- coverage/assets/
|
||||
- tmp/memory_test/
|
||||
|
||||
## EE-specific content
|
||||
.rspec-base-ee:
|
||||
extends:
|
||||
- .rspec-base
|
||||
- .only-ee
|
||||
script:
|
||||
- JOB_NAME=( $CI_JOB_NAME )
|
||||
- TEST_TOOL=${JOB_NAME[0]}
|
||||
- TEST_LEVEL=${JOB_NAME[1]}
|
||||
- DATABASE=${JOB_NAME[2]}
|
||||
- export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_ee_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
|
||||
- export KNAPSACK_GENERATE_REPORT=true KNAPSACK_LOG_LEVEL=debug KNAPSACK_TEST_DIR=spec
|
||||
- export CACHE_CLASSES=true
|
||||
- cp ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} ${KNAPSACK_REPORT_PATH}
|
||||
- scripts/gitaly-test-spawn
|
||||
- date
|
||||
- 'export KNAPSACK_TEST_FILE_PATTERN=$(ruby -r./lib/quality/test_level.rb -e "puts Quality::TestLevel.new(%(ee/)).pattern(:${TEST_LEVEL})")'
|
||||
- mkdir -p tmp/memory_test
|
||||
- export MEMORY_TEST_PATH="tmp/memory_test/ee_${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_memory.csv"
|
||||
- knapsack rspec "--color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag level:${TEST_LEVEL} --tag ~geo"
|
||||
- date
|
||||
|
||||
.rspec-base-pg-ee:
|
||||
extends: .rspec-base-ee
|
||||
services:
|
||||
- name: postgres:9.6
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
- name: redis:alpine
|
||||
- name: docker.elastic.co/elasticsearch/elasticsearch:5.6.12
|
||||
|
||||
rspec unit pg ee:
|
||||
extends: .rspec-base-pg-ee
|
||||
parallel: 7
|
||||
|
||||
rspec integration pg ee:
|
||||
extends: .rspec-base-pg-ee
|
||||
parallel: 3
|
||||
|
||||
rspec system pg ee:
|
||||
extends: .rspec-base-pg-ee
|
||||
parallel: 5
|
||||
|
||||
.rspec-base-geo:
|
||||
extends: .rspec-base-ee
|
||||
parallel: 3
|
||||
script:
|
||||
- JOB_NAME=( $CI_JOB_NAME )
|
||||
- TEST_TOOL=${JOB_NAME[0]}
|
||||
- TEST_LEVEL=${JOB_NAME[1]}
|
||||
- DATABASE=${JOB_NAME[2]}
|
||||
- export KNAPSACK_TEST_FILE_PATTERN="ee/spec/**{,/*/**}/*_spec.rb" KNAPSACK_GENERATE_REPORT=true CACHE_CLASSES=true
|
||||
- export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${TEST_TOOL}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
|
||||
- cp ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} ${KNAPSACK_REPORT_PATH}
|
||||
- source scripts/prepare_postgres_fdw.sh
|
||||
- scripts/gitaly-test-spawn
|
||||
- mkdir -p tmp/memory_test
|
||||
- export MEMORY_TEST_PATH="tmp/memory_test/ee_${TEST_TOOL}_${TEST_LEVEL}_${DATABASE}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_memory.csv"
|
||||
- knapsack rspec "-Ispec --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag geo"
|
||||
|
||||
rspec geo pg ee:
|
||||
extends:
|
||||
- .rspec-base-geo
|
||||
- .use-pg
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_NAME =~ /(^geo[\/-].*|.*-geo$)/
|
||||
|
||||
rspec geo pg-10 ee:
|
||||
extends:
|
||||
- .rspec-base-geo
|
||||
- .use-pg-10
|
||||
except:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_NAME =~ /(^geo[\/-].*|.*-geo$)/
|
||||
|
||||
quick-rspec geo pg ee:
|
||||
extends:
|
||||
- .rspec-base-geo
|
||||
- .use-pg
|
||||
stage: quick-test
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_NAME =~ /(^geo[\/-].*|.*-geo$)/
|
||||
|
||||
quick-rspec geo pg-10 ee:
|
||||
extends:
|
||||
- .rspec-base-geo
|
||||
- .use-pg-10
|
||||
stage: quick-test
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_REF_NAME =~ /(^geo[\/-].*|.*-geo$)/
|
||||
|
||||
rspec quarantine pg ee:
|
||||
extends:
|
||||
- rspec quarantine pg
|
||||
- .only-ee
|
||||
script:
|
||||
- export NO_KNAPSACK=1 CACHE_CLASSES=true
|
||||
- scripts/gitaly-test-spawn
|
||||
- bin/rspec --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml --tag quarantine -- ee/spec/
|
||||
|
||||
db:rollback geo:
|
||||
extends:
|
||||
- db:rollback
|
||||
- .only-ee
|
||||
script:
|
||||
- bundle exec rake geo:db:migrate VERSION=20170627195211
|
||||
- bundle exec rake geo:db:migrate
|
||||
|
||||
## END of EE-specific content
|
236
.gitlab/ci/reports.gitlab-ci.yml
Normal file
236
.gitlab/ci/reports.gitlab-ci.yml
Normal file
|
@ -0,0 +1,236 @@
|
|||
# include:
|
||||
# - template: Code-Quality.gitlab-ci.yml
|
||||
# - template: Security/SAST.gitlab-ci.yml
|
||||
# - template: Security/Dependency-Scanning.gitlab-ci.yml
|
||||
# - template: Security/DAST.gitlab-ci.yml
|
||||
|
||||
# We need to duplicate this job's definition because it seems it's impossible to
|
||||
# override an included `only.refs`.
|
||||
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
|
||||
code_quality:
|
||||
extends:
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
stage: test
|
||||
image: docker:stable
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- |
|
||||
if ! docker info &>/dev/null; then
|
||||
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
|
||||
export DOCKER_HOST='tcp://localhost:2375'
|
||||
fi
|
||||
fi
|
||||
- docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--volume "$PWD":/code
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"registry.gitlab.com/gitlab-org/security-products/codequality:12-0-stable" /code
|
||||
artifacts:
|
||||
reports:
|
||||
codequality: gl-code-quality-report.json
|
||||
expire_in: 1 week
|
||||
dependencies: []
|
||||
except:
|
||||
variables:
|
||||
- $CODE_QUALITY_DISABLED
|
||||
|
||||
# We need to duplicate this job's definition because it seems it's impossible to
|
||||
# override an included `only.refs`.
|
||||
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
|
||||
sast:
|
||||
extends:
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
stage: test
|
||||
image: docker:stable
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
SAST_BRAKEMAN_LEVEL: 2
|
||||
SAST_EXCLUDED_PATHS: qa,spec,doc,ee/spec
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export SAST_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')}
|
||||
- |
|
||||
if ! docker info &>/dev/null; then
|
||||
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
|
||||
export DOCKER_HOST='tcp://localhost:2375'
|
||||
fi
|
||||
fi
|
||||
- | # this is required to avoid undesirable reset of Docker image ENV variables being set on build stage
|
||||
function propagate_env_vars() {
|
||||
CURRENT_ENV=$(printenv)
|
||||
|
||||
for VAR_NAME; do
|
||||
echo $CURRENT_ENV | grep "${VAR_NAME}=" > /dev/null && echo "--env $VAR_NAME "
|
||||
done
|
||||
}
|
||||
- |
|
||||
docker run \
|
||||
$(propagate_env_vars \
|
||||
SAST_BANDIT_EXCLUDED_PATHS \
|
||||
SAST_ANALYZER_IMAGES \
|
||||
SAST_ANALYZER_IMAGE_PREFIX \
|
||||
SAST_ANALYZER_IMAGE_TAG \
|
||||
SAST_DEFAULT_ANALYZERS \
|
||||
SAST_PULL_ANALYZER_IMAGES \
|
||||
SAST_BRAKEMAN_LEVEL \
|
||||
SAST_FLAWFINDER_LEVEL \
|
||||
SAST_GITLEAKS_ENTROPY_LEVEL \
|
||||
SAST_GOSEC_LEVEL \
|
||||
SAST_EXCLUDED_PATHS \
|
||||
SAST_DOCKER_CLIENT_NEGOTIATION_TIMEOUT \
|
||||
SAST_PULL_ANALYZER_IMAGE_TIMEOUT \
|
||||
SAST_RUN_ANALYZER_TIMEOUT \
|
||||
SAST_JAVA_VERSION \
|
||||
ANT_HOME \
|
||||
ANT_PATH \
|
||||
GRADLE_PATH \
|
||||
JAVA_OPTS \
|
||||
JAVA_PATH \
|
||||
JAVA_8_VERSION \
|
||||
JAVA_11_VERSION \
|
||||
MAVEN_CLI_OPTS \
|
||||
MAVEN_PATH \
|
||||
MAVEN_REPO_PATH \
|
||||
SBT_PATH \
|
||||
FAIL_NEVER \
|
||||
) \
|
||||
--volume "$PWD:/code" \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
"registry.gitlab.com/gitlab-org/security-products/sast:$SAST_VERSION" /app/bin/run /code
|
||||
artifacts:
|
||||
expire_in: 7 days
|
||||
paths:
|
||||
- gl-sast-report.json
|
||||
reports:
|
||||
sast: gl-sast-report.json
|
||||
dependencies: []
|
||||
only:
|
||||
variables:
|
||||
- $GITLAB_FEATURES =~ /\bsast\b/
|
||||
except:
|
||||
variables:
|
||||
- $SAST_DISABLED
|
||||
|
||||
# We need to duplicate this job's definition because it seems it's impossible to
|
||||
# override an included `only.refs`.
|
||||
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
|
||||
dependency_scanning:
|
||||
extends:
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
stage: test
|
||||
image: docker:stable
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export DS_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')}
|
||||
- |
|
||||
if ! docker info &>/dev/null; then
|
||||
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
|
||||
export DOCKER_HOST='tcp://localhost:2375'
|
||||
fi
|
||||
fi
|
||||
- | # this is required to avoid undesirable reset of Docker image ENV variables being set on build stage
|
||||
function propagate_env_vars() {
|
||||
CURRENT_ENV=$(printenv)
|
||||
|
||||
for VAR_NAME; do
|
||||
echo $CURRENT_ENV | grep "${VAR_NAME}=" > /dev/null && echo "--env $VAR_NAME "
|
||||
done
|
||||
}
|
||||
- |
|
||||
docker run \
|
||||
$(propagate_env_vars \
|
||||
DS_ANALYZER_IMAGES \
|
||||
DS_ANALYZER_IMAGE_PREFIX \
|
||||
DS_ANALYZER_IMAGE_TAG \
|
||||
DS_DEFAULT_ANALYZERS \
|
||||
DS_EXCLUDED_PATHS \
|
||||
DEP_SCAN_DISABLE_REMOTE_CHECKS \
|
||||
DS_DOCKER_CLIENT_NEGOTIATION_TIMEOUT \
|
||||
DS_PULL_ANALYZER_IMAGE_TIMEOUT \
|
||||
DS_RUN_ANALYZER_TIMEOUT \
|
||||
DS_PYTHON_VERSION \
|
||||
DS_PIP_DEPENDENCY_PATH \
|
||||
PIP_INDEX_URL \
|
||||
PIP_EXTRA_INDEX_URL \
|
||||
) \
|
||||
--volume "$PWD:/code" \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
"registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$DS_VERSION" /code
|
||||
artifacts:
|
||||
reports:
|
||||
dependency_scanning: gl-dependency-scanning-report.json
|
||||
dependencies: []
|
||||
only:
|
||||
variables:
|
||||
- $GITLAB_FEATURES =~ /\bdependency_scanning\b/
|
||||
except:
|
||||
variables:
|
||||
- $DEPENDENCY_SCANNING_DISABLED
|
||||
|
||||
# We need to duplicate this job's definition because it seems it's impossible to
|
||||
# override an included `only.refs`.
|
||||
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
|
||||
dast:
|
||||
extends:
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-code-qa-changes
|
||||
- .only-review
|
||||
stage: qa
|
||||
dependencies: ["review-deploy"]
|
||||
before_script:
|
||||
- export DAST_WEBSITE="$(cat review_app_url.txt)"
|
||||
image:
|
||||
name: "registry.gitlab.com/gitlab-org/security-products/dast:$CI_SERVER_VERSION_MAJOR-$CI_SERVER_VERSION_MINOR-stable"
|
||||
variables:
|
||||
# URL to scan:
|
||||
# DAST_WEBSITE: https://example.com/
|
||||
#
|
||||
# Time limit for target availability (scan is attempted even when timeout):
|
||||
# DAST_TARGET_AVAILABILITY_TIMEOUT: 60
|
||||
#
|
||||
# Set these variables to scan with an authenticated user:
|
||||
# DAST_AUTH_URL: https://example.com/sign-in
|
||||
# DAST_USERNAME: john.doe@example.com
|
||||
# DAST_PASSWORD: john-doe-password
|
||||
# DAST_USERNAME_FIELD: session[user] # the name of username field at the sign-in HTML form
|
||||
# DAST_PASSWORD_FIELD: session[password] # the name of password field at the sign-in HTML form
|
||||
# DAST_AUTH_EXCLUDE_URLS: http://example.com/sign-out,http://example.com/sign-out-2 # optional: URLs to skip during the authenticated scan; comma-separated, no spaces in between
|
||||
#
|
||||
# Perform ZAP Full Scan, which includes both passive and active scanning:
|
||||
# DAST_FULL_SCAN_ENABLED: "true"
|
||||
allow_failure: true
|
||||
script:
|
||||
- export DAST_WEBSITE=${DAST_WEBSITE:-$(cat environment_url.txt)}
|
||||
- /analyze -t $DAST_WEBSITE
|
||||
artifacts:
|
||||
expire_in: 7 days
|
||||
paths:
|
||||
- gl-dast-report.json
|
||||
reports:
|
||||
dast: gl-dast-report.json
|
||||
only:
|
||||
variables:
|
||||
- $GITLAB_FEATURES =~ /\bdast\b/
|
||||
except:
|
||||
variables:
|
||||
- $DAST_DISABLED
|
285
.gitlab/ci/review.gitlab-ci.yml
Normal file
285
.gitlab/ci/review.gitlab-ci.yml
Normal file
|
@ -0,0 +1,285 @@
|
|||
.review-base:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-review
|
||||
- .only-code-qa-changes
|
||||
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
|
||||
dependencies: []
|
||||
before_script:
|
||||
- source scripts/utils.sh
|
||||
|
||||
.review-docker:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine
|
||||
services:
|
||||
- docker:19.03.0-dind
|
||||
tags:
|
||||
- gitlab-org
|
||||
- docker
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
GITLAB_EDITION: "ce"
|
||||
|
||||
build-qa-image:
|
||||
extends:
|
||||
- .review-docker
|
||||
- .only-code-qa-changes
|
||||
only:
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
stage: prepare
|
||||
script:
|
||||
- '[[ ! -d "ee/" ]] || export GITLAB_EDITION="ee"'
|
||||
- export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/gitlab-${GITLAB_EDITION}-qa:${CI_COMMIT_REF_SLUG}"
|
||||
- time docker build --cache-from gitlab/gitlab-${GITLAB_EDITION}-qa:nightly --tag ${QA_IMAGE} --file ./qa/Dockerfile ./
|
||||
- echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY}
|
||||
- time docker push ${QA_IMAGE}
|
||||
|
||||
.review-build-cng-base:
|
||||
extends:
|
||||
- .default-only
|
||||
- .only-code-qa-changes
|
||||
image: ruby:2.6-alpine
|
||||
stage: review-prepare
|
||||
before_script:
|
||||
- source scripts/utils.sh
|
||||
- install_api_client_dependencies_with_apk
|
||||
- install_gitlab_gem
|
||||
dependencies: []
|
||||
script:
|
||||
- BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng
|
||||
|
||||
review-build-cng:
|
||||
extends:
|
||||
- .review-build-cng-base
|
||||
- .only-review
|
||||
needs: ["gitlab:assets:compile pull-cache"]
|
||||
|
||||
schedule:review-build-cng:
|
||||
extends:
|
||||
- .review-build-cng-base
|
||||
- .only-review-schedules
|
||||
needs: ["gitlab:assets:compile"]
|
||||
|
||||
.review-deploy-base:
|
||||
extends: .review-base
|
||||
allow_failure: true
|
||||
stage: review
|
||||
variables:
|
||||
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
|
||||
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
|
||||
GITLAB_HELM_CHART_REF: "master"
|
||||
GITLAB_EDITION: "ce"
|
||||
environment:
|
||||
name: review/${CI_COMMIT_REF_NAME}
|
||||
url: https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}
|
||||
on_stop: review-stop
|
||||
before_script:
|
||||
- '[[ ! -d "ee/" ]] || export GITLAB_EDITION="ee"'
|
||||
- export GITLAB_SHELL_VERSION=$(<GITLAB_SHELL_VERSION)
|
||||
- export GITALY_VERSION=$(<GITALY_SERVER_VERSION)
|
||||
- export GITLAB_WORKHORSE_VERSION=$(<GITLAB_WORKHORSE_VERSION)
|
||||
- echo "${CI_ENVIRONMENT_URL}" > review_app_url.txt
|
||||
- source scripts/utils.sh
|
||||
- install_api_client_dependencies_with_apk
|
||||
- source scripts/review_apps/review-apps.sh
|
||||
script:
|
||||
- check_kube_domain
|
||||
- ensure_namespace
|
||||
- install_tiller
|
||||
- install_external_dns
|
||||
- download_chart
|
||||
- deploy || (display_deployment_debug && exit 1)
|
||||
- add_license
|
||||
artifacts:
|
||||
paths: [review_app_url.txt]
|
||||
expire_in: 2 days
|
||||
when: always
|
||||
|
||||
review-deploy:
|
||||
extends:
|
||||
- .review-deploy-base
|
||||
needs: ["review-build-cng"]
|
||||
|
||||
schedule:review-deploy:
|
||||
extends:
|
||||
- .review-deploy-base
|
||||
- .only-review-schedules
|
||||
needs: ["schedule:review-build-cng"]
|
||||
|
||||
review-stop:
|
||||
extends:
|
||||
- .review-deploy-base
|
||||
when: manual
|
||||
environment:
|
||||
action: stop
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
before_script:
|
||||
# We don't clone the repo by using GIT_STRATEGY: none and only download the
|
||||
# single script we need here so it's much faster than cloning.
|
||||
- apk add --update openssl
|
||||
- wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/review_apps/review-apps.sh
|
||||
- wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/utils.sh
|
||||
- source utils.sh
|
||||
- source review-apps.sh
|
||||
script:
|
||||
- delete_release
|
||||
artifacts:
|
||||
paths: []
|
||||
|
||||
review-cleanup-failed-deployment:
|
||||
extends: review-stop
|
||||
stage: prepare
|
||||
when: on_success
|
||||
allow_failure: false
|
||||
script:
|
||||
- delete_failed_release
|
||||
|
||||
.review-qa-base:
|
||||
extends:
|
||||
- .review-docker
|
||||
- .only-review
|
||||
- .only-code-qa-changes
|
||||
stage: qa
|
||||
variables:
|
||||
QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa"
|
||||
QA_CAN_TEST_GIT_PROTOCOL_V2: "false"
|
||||
QA_DEBUG: "true"
|
||||
GITLAB_USERNAME: "root"
|
||||
GITLAB_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}"
|
||||
GITLAB_ADMIN_USERNAME: "root"
|
||||
GITLAB_ADMIN_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}"
|
||||
GITHUB_ACCESS_TOKEN: "${REVIEW_APPS_QA_GITHUB_ACCESS_TOKEN}"
|
||||
EE_LICENSE: "${REVIEW_APPS_EE_LICENSE}"
|
||||
dependencies: ["review-deploy"]
|
||||
artifacts:
|
||||
paths:
|
||||
- ./qa/gitlab-qa-run-*
|
||||
expire_in: 7 days
|
||||
when: always
|
||||
before_script:
|
||||
- '[[ ! -d "ee/" ]] || export GITLAB_EDITION="ee"'
|
||||
- export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/gitlab-${GITLAB_EDITION}-qa:${CI_COMMIT_REF_SLUG}"
|
||||
- export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
|
||||
- echo "${CI_ENVIRONMENT_URL}"
|
||||
- echo "${QA_IMAGE}"
|
||||
- source scripts/utils.sh
|
||||
- install_api_client_dependencies_with_apk
|
||||
- gem install gitlab-qa --no-document ${GITLAB_QA_VERSION:+ --version ${GITLAB_QA_VERSION}}
|
||||
|
||||
review-qa-smoke:
|
||||
extends: .review-qa-base
|
||||
allow_failure: true
|
||||
script:
|
||||
- gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}"
|
||||
|
||||
review-qa-all:
|
||||
extends: .review-qa-base
|
||||
allow_failure: true
|
||||
when: manual
|
||||
parallel: 5
|
||||
script:
|
||||
- export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/review-qa-all_master_report.json
|
||||
- export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb
|
||||
- gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation
|
||||
|
||||
parallel-spec-reports:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-only
|
||||
- .only-code-qa-changes
|
||||
- .only-review
|
||||
image: ruby:2.6-alpine
|
||||
stage: post-test
|
||||
dependencies: ["review-qa-all"]
|
||||
variables:
|
||||
NEW_PARALLEL_SPECS_REPORT: qa/report-new.html
|
||||
BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
|
||||
allow_failure: true
|
||||
when: manual
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- qa/report-new.html
|
||||
- qa/gitlab-qa-run-*
|
||||
reports:
|
||||
junit: qa/gitlab-qa-run-*/**/rspec-*.xml
|
||||
script:
|
||||
- apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/*
|
||||
- gem install nokogiri --no-document
|
||||
- cd qa/gitlab-qa-run-*/gitlab-*
|
||||
- ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
|
||||
- cd -
|
||||
- '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}'
|
||||
- scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
|
||||
|
||||
review-performance:
|
||||
extends: .review-qa-base
|
||||
allow_failure: true
|
||||
before_script:
|
||||
- export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
|
||||
- echo "${CI_ENVIRONMENT_URL}"
|
||||
- mkdir -p gitlab-exporter
|
||||
- wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js
|
||||
- mkdir -p sitespeed-results
|
||||
script:
|
||||
- docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}"
|
||||
after_script:
|
||||
- mv sitespeed-results/data/performance.json performance.json
|
||||
artifacts:
|
||||
paths:
|
||||
- sitespeed-results/
|
||||
reports:
|
||||
performance: performance.json
|
||||
|
||||
schedule:review-performance:
|
||||
extends:
|
||||
- review-performance
|
||||
- .only-review-schedules
|
||||
dependencies: ["schedule:review-deploy"]
|
||||
|
||||
schedule:review-cleanup:
|
||||
extends:
|
||||
- .review-base
|
||||
- .only-review-schedules
|
||||
stage: prepare
|
||||
allow_failure: true
|
||||
environment:
|
||||
name: review/auto-cleanup
|
||||
action: stop
|
||||
before_script:
|
||||
- source scripts/utils.sh
|
||||
- install_gitlab_gem
|
||||
script:
|
||||
- ruby -rrubygems scripts/review_apps/automated_cleanup.rb
|
||||
|
||||
danger-review:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-only
|
||||
image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger
|
||||
stage: test
|
||||
dependencies: []
|
||||
only:
|
||||
variables:
|
||||
- $DANGER_GITLAB_API_TOKEN
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
variables:
|
||||
- $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/
|
||||
- $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/
|
||||
script:
|
||||
- git version
|
||||
- node --version
|
||||
- yarn install --frozen-lockfile --cache-folder .yarn-cache --prefer-offline
|
||||
- danger --fail-on-errors=true
|
48
.gitlab/ci/setup.gitlab-ci.yml
Normal file
48
.gitlab/ci/setup.gitlab-ci.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Insurance in case a gem needed by one of our releases gets yanked from
|
||||
# rubygems.org in the future.
|
||||
cache gems:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-cache
|
||||
- .default-before_script
|
||||
- .only-code-qa-changes
|
||||
stage: test
|
||||
dependencies: ["setup-test-env"]
|
||||
needs: ["setup-test-env"]
|
||||
variables:
|
||||
SETUP_DB: "false"
|
||||
script:
|
||||
- bundle package --all --all-platforms
|
||||
artifacts:
|
||||
paths:
|
||||
- vendor/cache
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- tags
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
|
||||
.minimal-job:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
dependencies: []
|
||||
|
||||
gitlab_git_test:
|
||||
extends: .minimal-job
|
||||
script:
|
||||
- spec/support/prepare-gitlab-git-test-for-commit --check-for-changes
|
||||
|
||||
no_ee_check:
|
||||
extends: .minimal-job
|
||||
script:
|
||||
- scripts/no-ee-check
|
||||
only:
|
||||
variables:
|
||||
- $CI_PROJECT_NAME == "gitlab-foss"
|
||||
- $CI_PROJECT_NAME == "gitlab-ce" # Support former project name for forks/mirrors
|
||||
- $CI_PROJECT_NAME == "gitlabhq" # Support former project name for dev
|
87
.gitlab/ci/test-metadata.gitlab-ci.yml
Normal file
87
.gitlab/ci/test-metadata.gitlab-ci.yml
Normal file
|
@ -0,0 +1,87 @@
|
|||
.tests-metadata-state:
|
||||
extends:
|
||||
- .default-only
|
||||
variables:
|
||||
TESTS_METADATA_S3_BUCKET: "gitlab-ce-cache"
|
||||
before_script:
|
||||
- source scripts/utils.sh
|
||||
artifacts:
|
||||
expire_in: 31d
|
||||
paths:
|
||||
- knapsack/
|
||||
- rspec_flaky/
|
||||
- rspec_profiling/
|
||||
|
||||
retrieve-tests-metadata:
|
||||
extends:
|
||||
- .tests-metadata-state
|
||||
- .only-code-changes
|
||||
stage: prepare
|
||||
cache:
|
||||
key: tests_metadata
|
||||
policy: pull
|
||||
script:
|
||||
- mkdir -p knapsack/${CI_PROJECT_NAME}/
|
||||
- wget -O $KNAPSACK_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$KNAPSACK_RSPEC_SUITE_REPORT_PATH || rm $KNAPSACK_RSPEC_SUITE_REPORT_PATH
|
||||
- '[[ -f $KNAPSACK_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
|
||||
- mkdir -p rspec_flaky/
|
||||
- mkdir -p rspec_profiling/
|
||||
- wget -O $FLAKY_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$FLAKY_RSPEC_SUITE_REPORT_PATH || rm $FLAKY_RSPEC_SUITE_REPORT_PATH
|
||||
- '[[ -f $FLAKY_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_SUITE_REPORT_PATH}'
|
||||
- '[[ ! -d "ee/" ]] || wget -O $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH || rm $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH'
|
||||
- '[[ ! -d "ee/" ]] || [[ -f $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
|
||||
|
||||
update-tests-metadata:
|
||||
extends:
|
||||
- .tests-metadata-state
|
||||
- .only-code-changes
|
||||
stage: post-test
|
||||
cache:
|
||||
key: tests_metadata
|
||||
paths:
|
||||
- knapsack/
|
||||
- rspec_flaky/
|
||||
policy: push
|
||||
script:
|
||||
- retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document
|
||||
- echo "{}" > ${KNAPSACK_RSPEC_SUITE_REPORT_PATH}
|
||||
- scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec_*_pg_node_*.json
|
||||
- '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $KNAPSACK_RSPEC_SUITE_REPORT_PATH'
|
||||
- '[[ ! -d "ee/" ]] || echo "{}" > ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
|
||||
- '[[ ! -d "ee/" ]] || scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec_*_pg_ee_*node_*.json'
|
||||
- '[[ ! -d "ee/" ]] || [[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH'
|
||||
- rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json
|
||||
- scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json
|
||||
- FLAKY_RSPEC_GENERATE_REPORT=1 scripts/prune-old-flaky-specs ${FLAKY_RSPEC_SUITE_REPORT_PATH}
|
||||
- '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $FLAKY_RSPEC_SUITE_REPORT_PATH'
|
||||
- rm -f rspec_flaky/all_*.json rspec_flaky/new_*.json
|
||||
- scripts/insert-rspec-profiling-data
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
variables:
|
||||
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
|
||||
- $CI_SERVER_HOST == "dev.gitlab.org"
|
||||
|
||||
flaky-examples-check:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
- .only-code-changes
|
||||
image: ruby:2.6-alpine
|
||||
stage: post-test
|
||||
variables:
|
||||
NEW_FLAKY_SPECS_REPORT: rspec_flaky/report-new.json
|
||||
allow_failure: true
|
||||
only:
|
||||
refs:
|
||||
- merge_requests
|
||||
artifacts:
|
||||
expire_in: 30d
|
||||
paths:
|
||||
- rspec_flaky/
|
||||
script:
|
||||
- '[[ -f $NEW_FLAKY_SPECS_REPORT ]] || echo "{}" > ${NEW_FLAKY_SPECS_REPORT}'
|
||||
- scripts/merge-reports ${NEW_FLAKY_SPECS_REPORT} rspec_flaky/new_*_*.json
|
||||
- scripts/detect-new-flaky-examples $NEW_FLAKY_SPECS_REPORT
|
14
.gitlab/ci/yaml.gitlab-ci.yml
Normal file
14
.gitlab/ci/yaml.gitlab-ci.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Yamllint of *.yml for .gitlab-ci.yml.
|
||||
# This uses rules from project root `.yamllint`.
|
||||
lint-ci-gitlab:
|
||||
extends:
|
||||
- .default-tags
|
||||
- .default-retry
|
||||
- .default-only
|
||||
only:
|
||||
changes:
|
||||
- "**/*.yml"
|
||||
image: sdesbure/yamllint:latest
|
||||
dependencies: []
|
||||
script:
|
||||
- yamllint .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates changelogs
|
|
@ -27,9 +27,9 @@ and verify the issue you're about to submit isn't a duplicate.
|
|||
|
||||
### Example Project
|
||||
|
||||
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
|
||||
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
|
||||
|
||||
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
|
||||
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
|
||||
|
||||
### What is the current *bug* behavior?
|
||||
|
||||
|
@ -42,7 +42,7 @@ and verify the issue you're about to submit isn't a duplicate.
|
|||
### Relevant logs and/or screenshots
|
||||
|
||||
(Paste any relevant logs - please use code blocks (```) to format console output,
|
||||
logs, and code as it's very hard to read otherwise.)
|
||||
logs, and code as it's tough to read otherwise.)
|
||||
|
||||
### Output of checks
|
||||
|
||||
|
|
20
.gitlab/issue_templates/Doc Review.md
Normal file
20
.gitlab/issue_templates/Doc Review.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!-- This issue requests a technical writer review as required for documentation
|
||||
content that was merged without one. -->
|
||||
|
||||
<!-- NOTE: Please add a DevOps stage label (format `devops:<stage_name>`)
|
||||
and assign the technical writer who is
|
||||
[listed for that stage](https://about.gitlab.com/handbook/product/categories/#devops-stages). -->
|
||||
|
||||
|
||||
## References
|
||||
|
||||
Merged MR that introduced documentation requiring review:
|
||||
|
||||
Related issue(s):
|
||||
|
||||
## Further Details
|
||||
|
||||
<!-- Any additional context, questions, or notes for the technical writer. -->
|
||||
|
||||
|
||||
/label ~Documentation ~docs-review
|
|
@ -1,54 +1,53 @@
|
|||
<!--See the general documentation guidelines https://docs.gitlab.com/ee/development/documentation -->
|
||||
<!--
|
||||
|
||||
<!-- Mention "documentation" or "docs" in the issue title -->
|
||||
* Use this issue template for suggesting new docs or updates to existing docs.
|
||||
Note: Doc work as part of feature development is covered in the Feature Request template.
|
||||
|
||||
* For issues related to features of the docs.gitlab.com site, see
|
||||
https://gitlab.com/gitlab-org/gitlab-docs/issues/
|
||||
|
||||
<!-- Use this description template for new docs or updates to existing docs. -->
|
||||
* For information about documentation content and process, see
|
||||
https://docs.gitlab.com/ee/development/documentation/ -->
|
||||
|
||||
<!-- Check the documentation structure guidelines for guidance: https://docs.gitlab.com/ee/development/documentation/structure.html-->
|
||||
<!-- Type of issue -->
|
||||
|
||||
- [ ] Documents Feature A <!-- feature name -->
|
||||
- [ ] Follow-up from: #XXX, !YYY <!-- Mention related issues, MRs, and epics when available -->
|
||||
<!-- Un-comment the line for the applicable doc issue type to add its label.
|
||||
Note that all text on that line is deleted upon issue creation. -->
|
||||
<!-- /label ~"docs:fix" - Correction or clarification needed. -->
|
||||
<!-- /label ~"docs:new" - New doc needed to cover a new topic or use case. -->
|
||||
<!-- /label ~"docs:improvement" - Improving an existing doc; e.g. adding a diagram, adding or rewording text, resolving redundancies, cross-linking, etc. -->
|
||||
<!-- /label ~"docs:revamp" - Review a page or group of pages in order to plan and implement major improvements/rewrites. -->
|
||||
<!-- /label ~"docs:other" - Anything else. -->
|
||||
|
||||
## New doc or update?
|
||||
### Problem to solve
|
||||
|
||||
<!-- Mark either of these boxes: -->
|
||||
<!-- Include the following detail as necessary:
|
||||
* What product or feature(s) affected?
|
||||
* What docs or doc section affected? Include links or paths.
|
||||
* Is there a problem with a specific document, or a feature/process that's not addressed sufficiently in docs?
|
||||
* Any other ideas or requests?
|
||||
-->
|
||||
|
||||
- [ ] New documentation
|
||||
- [ ] Update existing documentation
|
||||
### Further details
|
||||
|
||||
## Checklists
|
||||
<!--
|
||||
* Any concepts, procedures, reference info we could add to make it easier to successfully use GitLab?
|
||||
* Include use cases, benefits, and/or goals for this work.
|
||||
* If adding content: What audience is it intended for? (What roles and scenarios?)
|
||||
For ideas, see personas at https://design.gitlab.com/research/personas or the persona labels at
|
||||
https://gitlab.com/groups/gitlab-org/-/labels?utf8=%E2%9C%93&subscribed=&search=persona%3A
|
||||
-->
|
||||
|
||||
### Product Manager
|
||||
### Proposal
|
||||
|
||||
<!-- Reference: https://docs.gitlab.com/ee/development/documentation/workflow.html#1-product-manager-s-role-in-the-documentation-process -->
|
||||
<!-- Further specifics for how can we solve the problem. -->
|
||||
|
||||
- [ ] Add the correct labels
|
||||
- [ ] Add the correct milestone
|
||||
- [ ] Indicate the correct document/directory for this feature <!-- (ping the tech writers for help if you're not sure) -->
|
||||
- [ ] Fill the doc blurb below
|
||||
### Who can address the issue
|
||||
|
||||
#### Documentation blurb
|
||||
<!-- What if any special expertise is required to resolve this issue? -->
|
||||
|
||||
<!-- Documentation template: https://docs.gitlab.com/ee/development/documentation/structure.html#documentation-template-for-new-docs -->
|
||||
### Other links/references
|
||||
|
||||
- Doc **title**
|
||||
|
||||
<!-- write the doc title here -->
|
||||
|
||||
- Feature **overview/description**
|
||||
|
||||
<!-- Write the feature overview here -->
|
||||
|
||||
- Feature **use cases**
|
||||
|
||||
<!-- Write the use cases here -->
|
||||
|
||||
### Developer
|
||||
|
||||
<!-- Reference: https://docs.gitlab.com/ee/development/documentation/workflow.html#2-developer-s-role-in-the-documentation-process -->
|
||||
|
||||
- [ ] Copy the doc blurb above and paste it into the doc
|
||||
- [ ] Write the tutorial - explain how to use the feature
|
||||
- [ ] Submit the MR using the appropriate MR description template
|
||||
<!-- E.g. related GitLab issues/MRs -->
|
||||
|
||||
/label ~Documentation
|
||||
|
|
44
.gitlab/issue_templates/Feature Flag Roll Out.md
Normal file
44
.gitlab/issue_templates/Feature Flag Roll Out.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!-- Title suggestion: [Feature flag] Enable description of feature -->
|
||||
|
||||
## What
|
||||
|
||||
Remove the `:feature_name` feature flag ...
|
||||
|
||||
## Owners
|
||||
|
||||
- Team: NAME_OF_TEAM
|
||||
- Most appropriate slack channel to reach out to: `#g_TEAM_NAME`
|
||||
- Best individual to reach out to: NAME
|
||||
|
||||
## Expectations
|
||||
|
||||
### What are we expecting to happen?
|
||||
|
||||
### What might happen if this goes wrong?
|
||||
|
||||
### What can we monitor to detect problems with this?
|
||||
|
||||
<!-- Which dashboards from https://dashboards.gitlab.net are most relevant? -->
|
||||
|
||||
## Beta groups/projects
|
||||
|
||||
If applicable, any groups/projects that are happy to have this feature turned on early. Some organizations may wish to test big changes they are interested in with a small subset of users ahead of time for example.
|
||||
|
||||
- `gitlab-org/gitlab-ce`/`gitlab-org/gitlab-ee` projects
|
||||
- `gitlab-org`/`gitlab-com` groups
|
||||
- ...
|
||||
|
||||
## Roll Out Steps
|
||||
|
||||
- [ ] Enable on staging
|
||||
- [ ] Test on staging
|
||||
- [ ] Ensure that documentation has been updated
|
||||
- [ ] Enable on GitLab.com for individual groups/projects listed above and verify behaviour
|
||||
- [ ] Announce on the issue an estimated time this will be enabled on GitLab.com
|
||||
- [ ] Enable on GitLab.com by running chatops command in `#production`
|
||||
- [ ] Cross post chatops slack command to `#support_gitlab-com` and in your team channel
|
||||
- [ ] Announce on the issue that the flag has been enabled
|
||||
- [ ] Remove feature flag and add changelog entry
|
||||
- [ ] After the flag removal is deployed, [clean up the feature flag](https://docs.gitlab.com/ee/development/feature_flags/controls.html#cleaning-up) by running chatops command in `#production` channel
|
||||
|
||||
/label ~"feature flag"
|
|
@ -1,45 +1,51 @@
|
|||
### Problem to solve
|
||||
|
||||
<!--- What problem do we solve? -->
|
||||
<!-- What problem do we solve? -->
|
||||
|
||||
### Target audience
|
||||
### Intended users
|
||||
|
||||
<!--- For whom are we doing this? Include a [persona](https://design.gitlab.com/research/personas)
|
||||
listed below, if applicable, along with its [label](https://gitlab.com/groups/gitlab-org/-/labels?utf8=%E2%9C%93&subscribed=&search=persona%3A),
|
||||
or define a specific company role, e.g. "Release Manager".
|
||||
<!-- Who will use this feature? If known, include any of the following: types of users (e.g. Developer), personas, or specific company roles (e.g. Release Manager). It's okay to write "Unknown" and fill this field in later.
|
||||
|
||||
Existing personas are: (copy relevant personas out of this comment, and delete any persona that does not apply)
|
||||
* [Parker (Product Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#parker-product-manager)
|
||||
* [Delaney (Development Team Lead)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead)
|
||||
* [Sasha (Software Developer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer)
|
||||
* [Presley (Product Designer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#presley-product-designer)
|
||||
* [Devon (DevOps Engineer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#devon-devops-engineer)
|
||||
* [Sidney (Systems Administrator)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sidney-systems-administrator)
|
||||
* [Sam (Security Analyst)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sam-security-analyst)
|
||||
* [Dana (Data Analyst)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#dana-data-analyst)
|
||||
|
||||
- Parker, Product Manager, https://design.gitlab.com/research/personas#persona-parker
|
||||
/label ~"Persona: Product Manager"
|
||||
|
||||
- Delaney, Development Team Lead, https://design.gitlab.com/research/personas#persona-delaney
|
||||
/label ~"Persona: Development Team Lead"
|
||||
|
||||
- Sasha, Software Developer, https://design.gitlab.com/research/personas#persona-sasha
|
||||
/label ~"Persona: Software developer"
|
||||
|
||||
- Devon, DevOps Engineer, https://design.gitlab.com/research/personas#persona-devon
|
||||
/label ~"Persona: DevOps Engineer"
|
||||
|
||||
- Sidney, Systems Administrator, https://design.gitlab.com/research/personas#persona-sidney
|
||||
/label ~"Persona: Systems Administrator"
|
||||
|
||||
- Sam, Security Analyst, https://design.gitlab.com/research/personas#persona-sam
|
||||
/label ~"Persona: Security Analyst"
|
||||
-->
|
||||
Personas are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ -->
|
||||
|
||||
### Further details
|
||||
|
||||
<!--- Include use cases, benefits, and/or goals (contributes to our vision?) -->
|
||||
<!-- Include use cases, benefits, and/or goals (contributes to our vision?) -->
|
||||
|
||||
### Proposal
|
||||
|
||||
<!--- How are we going to solve the problem? Try to include the user journey! -->
|
||||
<!-- How are we going to solve the problem? Try to include the user journey! https://about.gitlab.com/handbook/journeys/#user-journey -->
|
||||
|
||||
### Permissions and Security
|
||||
|
||||
<!-- What permissions are required to perform the described actions? Are they consistent with the existing permissions as documented for users, groups, and projects as appropriate? Is the proposed behavior consistent between the UI, API, and other access methods (e.g. email replies)?-->
|
||||
|
||||
### Documentation
|
||||
|
||||
<!-- See the Feature Change Documentation Workflow https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html
|
||||
Add all known Documentation Requirements here, per https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html#documentation-requirements
|
||||
If this feature requires changing permissions, this document https://docs.gitlab.com/ee/user/permissions.html must be updated accordingly. -->
|
||||
|
||||
### Testing
|
||||
|
||||
<!-- What risks does this change pose? How might it affect the quality of the product? What additional test coverage or changes to tests will be needed? Will it require cross-browser testing? See the test engineering process for further help: https://about.gitlab.com/handbook/engineering/quality/test-engineering/ -->
|
||||
|
||||
### What does success look like, and how can we measure that?
|
||||
|
||||
<!--- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this -->
|
||||
<!-- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this. -->
|
||||
|
||||
### What is the type of buyer?
|
||||
|
||||
<!-- Which leads to: in which enterprise tier should this feature go? See https://about.gitlab.com/handbook/product/pricing/#four-tiers -->
|
||||
|
||||
### Links / references
|
||||
|
||||
|
|
41
.gitlab/issue_templates/Problem_Validation.md
Normal file
41
.gitlab/issue_templates/Problem_Validation.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
## Problem Statement
|
||||
|
||||
<!-- What is the problem we hope to validate and solve? -->
|
||||
|
||||
## Reach
|
||||
|
||||
<!-- Please describe who suffers from this problem. Consider referring to our personas, which are described at https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/ -->
|
||||
|
||||
<!-- Please also quantify the problem's reach using the following values, considering an aggregate across GitLab.com and self-managed:
|
||||
|
||||
10.0 = Impacts the vast majority (~80% or greater) of our users, prospects, or customers.
|
||||
6.0 = Impacts a large percentage (~50% to ~80%) of the above.
|
||||
3.0 = Significant reach (~25% to ~50%).
|
||||
1.5 = Small reach (~5% to ~25%).
|
||||
0.5 = Minimal reach (Less than ~5%). -->
|
||||
|
||||
## Impact
|
||||
|
||||
<!-- How do we positively impact the users above and GitLab's business by solving this problem? Please describe briefly, and provide a numerical assessment:
|
||||
|
||||
3.0 = Massive impact
|
||||
2.0 = High impact
|
||||
1.0 = Medium impact
|
||||
0.5 = Low impact
|
||||
0.25 = Minimal impact -->
|
||||
|
||||
## Confidence
|
||||
|
||||
<!-- How do we know this is a problem? Please provide and link to any supporting information (e.g. data, customer verbatims) and use this basis to provide a numerical assessment on our confidence level in this problem's severity:
|
||||
|
||||
100% = High confidence
|
||||
80% = Medium confidence
|
||||
50% = Low confidence -->
|
||||
|
||||
## Effort
|
||||
|
||||
<!-- How much effort do we think it will be to solve this problem? Please include all counterparts (Product, UX, Engineering, etc) in your assessment and quantify the number of person-months needed to dedicate to the effort.
|
||||
|
||||
For example, if the solution will take a product manager, designer, and engineer two weeks of effort - you may quantify this as 1.5 (based on 0.5 months x 3 people). -->
|
||||
|
||||
/label ~"workflow::problem backlog"
|
41
.gitlab/issue_templates/Refactoring.md
Normal file
41
.gitlab/issue_templates/Refactoring.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
## Summary
|
||||
|
||||
<!--
|
||||
Please briefly describe what part of the code base needs to be refactored.
|
||||
-->
|
||||
|
||||
## Improvements
|
||||
|
||||
<!--
|
||||
Explain the benefits of refactoring this code.
|
||||
See also https://about.gitlab.com/handbook/values/index.html#say-why-not-just-what
|
||||
-->
|
||||
|
||||
## Risks
|
||||
|
||||
<!--
|
||||
Please list features that can break because of this refactoring and how you intend to solve that.
|
||||
-->
|
||||
|
||||
## Involved components
|
||||
|
||||
<!--
|
||||
List files or directories that will be changed by the refactoring.
|
||||
-->
|
||||
|
||||
## Optional: Intended side effects
|
||||
|
||||
<!--
|
||||
If the refactoring involves changes apart from the main improvements (such as a better UI), list them here.
|
||||
It may be a good idea to create separate issues and link them here.
|
||||
-->
|
||||
|
||||
|
||||
## Optional: Missing test coverage
|
||||
|
||||
<!--
|
||||
If you are aware of tests that need to be written or adjusted apart from unit tests for the changed components,
|
||||
please list them here.
|
||||
-->
|
||||
|
||||
/label ~backstage
|
|
@ -1,7 +1,7 @@
|
|||
<!--
|
||||
# Read me first!
|
||||
|
||||
Set the title to: `Security Release: 11.4.X, 11.3.X, and 11.2.X`
|
||||
Set the title to: `Security Release: 12.2.X, 12.1.X, and 12.0.X`
|
||||
-->
|
||||
|
||||
## Releases tasks
|
||||
|
@ -12,9 +12,9 @@ Set the title to: `Security Release: 11.4.X, 11.3.X, and 11.2.X`
|
|||
|
||||
## Version issues:
|
||||
|
||||
* 11.4.X: {release task link}
|
||||
* 11.3.X: {release task link}
|
||||
* 11.2.X: {release task link}
|
||||
* 12.2.X: {release task link}
|
||||
* 12.1.X: {release task link}
|
||||
* 12.0.X: {release task link}
|
||||
|
||||
## Security Issues:
|
||||
|
||||
|
@ -34,9 +34,9 @@ Set the title to: `Security Release: 11.4.X, 11.3.X, and 11.2.X`
|
|||
|
||||
| Version | MR |
|
||||
|---------|----|
|
||||
| 11.4 | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
| 11.3 | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
| 11.2 | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
| 12.2 | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
| 12.1 | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
| 12.0 | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
| master | {https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/ link} |
|
||||
|
||||
|
||||
|
@ -48,9 +48,9 @@ Set the title to: `Security Release: 11.4.X, 11.3.X, and 11.2.X`
|
|||
|
||||
| Version | MR |
|
||||
|---------|----|
|
||||
| 11.4| {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
| 11.3 | {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
| 11.2 | {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
| 12.2 | {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
| 12.1 | {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
| 12.0 | {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
| master | {https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/ link} |
|
||||
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ Set the title to: `Description of the original issue`
|
|||
|
||||
#### Backports
|
||||
|
||||
- [ ] Once the MR is ready to be merged, create MRs targetting the last 3 releases, plus the current RC if between the 7th and 22nd of the month.
|
||||
- [ ] Once the MR is ready to be merged, create MRs targeting the latest 3 stable branches
|
||||
- [ ] At this point, it might be easy to squash the commits from the MR into one
|
||||
- You can use the script `bin/secpick` instead of the following steps, to help you cherry-picking. See the [secpick documentation]
|
||||
- [ ] Create each MR targetting the stable branch `X-Y-stable`, using the "Security Release" merge request template.
|
||||
- [ ] Create each MR targeting the stable branch `X-Y-stable`, using the "Security Release" merge request template.
|
||||
- Every merge request will have its own set of TODOs, so make sure to
|
||||
complete those.
|
||||
- [ ] Make sure all MRs have a link in the [links section](#links)
|
||||
|
@ -30,6 +30,7 @@ Set the title to: `Description of the original issue`
|
|||
#### Documentation and final details
|
||||
|
||||
- [ ] Check the topic on #security to see when the next release is going to happen and add a link to the [links section](#links)
|
||||
- [ ] Add links to this issue and your MRs in the description of the security release issue
|
||||
- [ ] Find out the versions affected (the Git history of the files affected may help you with this) and add them to the [details section](#details)
|
||||
- [ ] Fill in any upgrade notes that users may need to take into account in the [details section](#details)
|
||||
- [ ] Add Yes/No and further details if needed to the migration and settings columns in the [details section](#details)
|
||||
|
|
|
@ -89,8 +89,8 @@ New end-to-end and integration tests (Selenium and API) should be added to the
|
|||
|
||||
Please note if automated tests already exist.
|
||||
|
||||
When adding new automated tests, please keep [testing levels](https://docs.gitlab.com/ce/development/testing_guide/testing_levels.html)
|
||||
When adding new automated tests, please keep [testing levels](https://docs.gitlab.com/ee/development/testing_guide/testing_levels.html)
|
||||
in mind.
|
||||
-->
|
||||
|
||||
/label ~Quality ~"test plan"
|
||||
/label ~Quality ~"test\-plan"
|
||||
|
|
|
@ -22,11 +22,11 @@ https://docs.gitlab.com/ce/development/documentation/index.html#changing-documen
|
|||
- [ ] 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/` and `ee/app/views` (for GitLab EE) directories.
|
||||
- [ ] Make sure to add [`redirect_from`](https://docs.gitlab.com/ce/development/writing_documentation.html#redirections-for-pages-with-disqus-comments)
|
||||
- [ ] Make sure to add [`redirect_from`](https://docs.gitlab.com/ce/development/documentation/index.html#redirections-for-pages-with-disqus-comments)
|
||||
to the new document if there are any Disqus comments on the old document thread.
|
||||
- [ ] Update the link in `features.yml` (if applicable)
|
||||
- [ ] If working on CE and the `ee-compat-check` jobs fails, submit an MR to EE
|
||||
with the changes as well (https://docs.gitlab.com/ce/development/writing_documentation.html#cherry-picking-from-ce-to-ee).
|
||||
with the changes as well (https://docs.gitlab.com/ce/development/documentation/index.html#cherry-picking-from-ce-to-ee).
|
||||
- [ ] Ping one of the technical writers for review.
|
||||
|
||||
/label ~Documentation
|
||||
|
|
|
@ -16,7 +16,7 @@ Add a description of your merge request here.
|
|||
|
||||
## Database checklist
|
||||
|
||||
- [ ] Conforms to the [database guides](https://docs.gitlab.com/ee/development/README.html#databases-guides)
|
||||
- [ ] Conforms to the [database guides](https://docs.gitlab.com/ee/development/README.html#database-guides)
|
||||
|
||||
When adding migrations:
|
||||
|
||||
|
@ -39,20 +39,11 @@ When adding tables:
|
|||
|
||||
- [ ] Ordered columns based on the [Ordering Table Columns](https://docs.gitlab.com/ee/development/ordering_table_columns.html#ordering-table-columns) guidelines
|
||||
- [ ] Added foreign keys to any columns pointing to data in other tables
|
||||
- [ ] Added indexes for fields that are used in statements such as WHERE, ORDER BY, GROUP BY, and JOINs
|
||||
- [ ] Added indexes for fields that are used in statements such as `WHERE`, `ORDER BY`, `GROUP BY`, and `JOIN`s
|
||||
|
||||
When removing columns, tables, indexes or other structures:
|
||||
|
||||
- [ ] Removed these in a post-deployment migration
|
||||
- [ ] Made sure the application no longer uses (or ignores) these structures
|
||||
|
||||
## General checklist
|
||||
|
||||
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
|
||||
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/documentation/index.html#contributing-to-docs)
|
||||
- [ ] [Tests added for this feature/bug](https://docs.gitlab.com/ee/development/testing_guide/index.html)
|
||||
- [ ] Conforms to the [code review guidelines](https://docs.gitlab.com/ee/development/code_review.html)
|
||||
- [ ] Conforms to the [merge request performance guidelines](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
|
||||
- [ ] Conforms to the [style guides](https://gitlab.com/gitlab-org/gitlab-ee/blob/master/CONTRIBUTING.md#style-guides)
|
||||
|
||||
/label ~database
|
||||
/label ~database ~"database::review pending"
|
||||
|
|
|
@ -1,33 +1,40 @@
|
|||
<!--See the general documentation guidelines https://docs.gitlab.com/ee/development/documentation -->
|
||||
<!-- Follow the documentation workflow https://docs.gitlab.com/ee/development/documentation/workflow.html -->
|
||||
<!-- Additional information is located at https://docs.gitlab.com/ee/development/documentation/ -->
|
||||
|
||||
<!-- Mention "documentation" or "docs" in the MR title -->
|
||||
|
||||
<!-- Use this description template for new docs or updates to existing docs. For changing documentation location use the "Change documentation location" template -->
|
||||
<!-- For changing documentation location use the "Change documentation location" template -->
|
||||
|
||||
## What does this MR do?
|
||||
|
||||
<!-- Briefly describe what this MR is about -->
|
||||
<!-- Briefly describe what this MR is about. -->
|
||||
|
||||
## Related issues
|
||||
|
||||
<!-- Mention the issue(s) this MR closes or is related to -->
|
||||
|
||||
Closes
|
||||
<!-- Link related issues below. Insert the issue link or reference after the word "Closes" if merging this should automatically close it. -->
|
||||
|
||||
## Author's checklist
|
||||
|
||||
- [ ] [Apply the correct labels and milestone](https://docs.gitlab.com/ee/development/documentation/workflow.html#2-developer-s-role-in-the-documentation-process)
|
||||
- [ ] Crosslink the document from the higher-level index
|
||||
- [ ] Crosslink the document from other subject-related docs
|
||||
- [ ] Feature moving tiers? Make sure the change is also reflected in [`features.yml`](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/features.yml)
|
||||
- [ ] Correctly apply the product [badges](https://docs.gitlab.com/ee/development/documentation/styleguide.html#product-badges) and [tiers](https://docs.gitlab.com/ee/development/documentation/styleguide.html#gitlab-versions-and-tiers)
|
||||
- [ ] [Port the MR to EE (or backport from CE)](https://docs.gitlab.com/ee/development/documentation/index.html#cherry-picking-from-ce-to-ee): _always recommended, required when the `ee-compat-check` job fails_
|
||||
- [ ] Follow the [Documentation Guidelines](https://docs.gitlab.com/ee/development/documentation/) and [Style Guide](https://docs.gitlab.com/ee/development/documentation/styleguide.html).
|
||||
- [ ] If applicable, update the [permissions table](https://docs.gitlab.com/ee/user/permissions.html).
|
||||
- [ ] Link docs to and from the higher-level index page, plus other related docs where helpful.
|
||||
- [ ] Apply the ~Documentation label.
|
||||
|
||||
## Review checklist
|
||||
|
||||
- [ ] Your team's review (required)
|
||||
- [ ] PM's review (recommended, but not a blocker)
|
||||
- [ ] Technical writer's review (required)
|
||||
- [ ] Merge the EE-MR first, CE-MR afterwards
|
||||
All reviewers can help ensure accuracy, clarity, completeness, and adherence to the [Documentation Guidelines](https://docs.gitlab.com/ee/development/documentation/) and [Style Guide](https://docs.gitlab.com/ee/development/documentation/styleguide.html).
|
||||
|
||||
**1. Primary Reviewer**
|
||||
|
||||
* [ ] Review by a code reviewer or other selected colleague to confirm accuracy, clarity, and completeness. This can be skipped for minor fixes without substantive content changes.
|
||||
|
||||
**2. Technical Writer**
|
||||
|
||||
* [ ] Optional: Technical writer review. If not requested for this MR, must be scheduled post-merge. To request for this MR, assign the writer listed for the applicable [DevOps stage](https://about.gitlab.com/handbook/product/categories/#devops-stages).
|
||||
|
||||
**3. Maintainer**
|
||||
|
||||
1. [ ] Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
|
||||
1. [ ] Ensure a release milestone is set and that you merge the equivalent EE MR before the CE MR if both exist.
|
||||
1. [ ] If there has not been a technical writer review, [create an issue for one using the Doc Review template](https://gitlab.com/gitlab-org/gitlab-ce/issues/new?issuable_template=Doc%20Review).
|
||||
|
||||
/label ~Documentation
|
||||
|
|
|
@ -7,6 +7,10 @@ See [the general developer security release guidelines](https://gitlab.com/gitla
|
|||
This merge request _must not_ close the corresponding security issue _unless_ it
|
||||
targets master.
|
||||
|
||||
When submitting a merge request for CE, a corresponding EE merge request is
|
||||
always required. This makes it easier to merge security merge requests, as
|
||||
manually merging CE into EE is no longer required.
|
||||
|
||||
-->
|
||||
## Related issues
|
||||
|
||||
|
@ -20,8 +24,8 @@ targets master.
|
|||
- [ ] Title of this MR is the same as for all backports
|
||||
- [ ] A [CHANGELOG entry](https://docs.gitlab.com/ee/development/changelog.html) is added without a `merge_request` value, with `type` set to `security`
|
||||
- [ ] Add a link to this MR in the `links` section of related issue
|
||||
- [ ] Add a link to an EE MR if required
|
||||
- [ ] Assign to a reviewer
|
||||
- [ ] Set up an EE MR (always required for CE merge requests): EE_MR_LINK_HERE
|
||||
- [ ] Assign to a reviewer (that is not a release manager)
|
||||
|
||||
## Reviewer checklist
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Documentation
|
||||
- source: /doc/(.+?)\.md/ # doc/administration/build_artifacts.md
|
||||
public: '\1.html' # doc/administration/build_artifacts.html
|
||||
- source: /doc/(.+?)\.md/ # doc/administration/build_artifacts.md
|
||||
public: '\1.html' # doc/administration/build_artifacts.html
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
inherits_from:
|
||||
- .haml-lint_todo.yml
|
||||
# Whether to ignore frontmatter at the beginning of HAML documents for
|
||||
# frameworks such as Jekyll/Middleman
|
||||
skip_frontmatter: false
|
||||
exclude:
|
||||
- 'vendor/**/*'
|
||||
- 'spec/**/*'
|
||||
require:
|
||||
- './haml_lint/linter/no_plain_nodes.rb'
|
||||
|
||||
linters:
|
||||
AltText:
|
||||
|
@ -97,6 +101,7 @@ linters:
|
|||
- Cop/LineBreakAroundConditionalBlock
|
||||
- Cop/ProjectPathHelper
|
||||
- GitlabSecurity/PublicSend
|
||||
- Layout/EmptyLineAfterGuardClause
|
||||
- Layout/LeadingCommentSpace
|
||||
- Layout/SpaceAfterColon
|
||||
- Layout/SpaceAfterComma
|
||||
|
@ -112,11 +117,12 @@ linters:
|
|||
- Lint/LiteralInInterpolation
|
||||
- Lint/ParenthesesAsGroupedExpression
|
||||
- Lint/RedundantWithIndex
|
||||
- Lint/Syntax
|
||||
- Lint/SafeNavigationConsistency
|
||||
- Metrics/BlockNesting
|
||||
- Naming/VariableName
|
||||
- Performance/RedundantMatch
|
||||
- Performance/StringReplacement
|
||||
- Rails/LinkToBlank
|
||||
- Rails/Presence
|
||||
- Rails/RequestReferer
|
||||
- Style/AndOr
|
||||
|
@ -134,6 +140,7 @@ linters:
|
|||
- Style/TernaryParentheses
|
||||
- Style/TrailingCommaInHashLiteral
|
||||
- Style/UnlessElse
|
||||
- Style/UnneededCondition
|
||||
- Style/WordArray
|
||||
- Style/ZeroLengthPredicate
|
||||
|
||||
|
@ -147,9 +154,12 @@ linters:
|
|||
enabled: true
|
||||
style: space
|
||||
|
||||
Syntax:
|
||||
enabled: true
|
||||
|
||||
Indentation:
|
||||
enabled: true
|
||||
character: space # or tab
|
||||
character: space # or tab
|
||||
|
||||
TagName:
|
||||
enabled: true
|
||||
|
|
523
.haml-lint_todo.yml
Normal file
523
.haml-lint_todo.yml
Normal file
|
@ -0,0 +1,523 @@
|
|||
# This configuration was generated by
|
||||
# `haml-lint --auto-gen-config`
|
||||
# on 2019-05-07 19:04:08 +0100 using Haml-Lint version 0.30.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the lints are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of Haml-Lint, may require this file to be generated again.
|
||||
|
||||
linters:
|
||||
# Offense count: 2075
|
||||
NoPlainNodes:
|
||||
enabled: true
|
||||
exclude:
|
||||
- 'app/views/admin/abuse_reports/_abuse_report.html.haml'
|
||||
- 'app/views/admin/abuse_reports/index.html.haml'
|
||||
- 'app/views/admin/appearances/_form.html.haml'
|
||||
- 'app/views/admin/application_settings/_abuse.html.haml'
|
||||
- 'app/views/admin/application_settings/_diff_limits.html.haml'
|
||||
- 'app/views/admin/application_settings/_gitaly.html.haml'
|
||||
- 'app/views/admin/application_settings/_influx.html.haml'
|
||||
- 'app/views/admin/application_settings/_ip_limits.html.haml'
|
||||
- 'app/views/admin/application_settings/_logging.html.haml'
|
||||
- 'app/views/admin/application_settings/_performance.html.haml'
|
||||
- 'app/views/admin/application_settings/_plantuml.html.haml'
|
||||
- 'app/views/admin/application_settings/_prometheus.html.haml'
|
||||
- 'app/views/admin/application_settings/_realtime.html.haml'
|
||||
- 'app/views/admin/application_settings/_repository_check.html.haml'
|
||||
- 'app/views/admin/application_settings/_repository_storage.html.haml'
|
||||
- 'app/views/admin/application_settings/_signin.html.haml'
|
||||
- 'app/views/admin/application_settings/_signup.html.haml'
|
||||
- 'app/views/admin/application_settings/_spam.html.haml'
|
||||
- 'app/views/admin/application_settings/_terminal.html.haml'
|
||||
- 'app/views/admin/application_settings/_usage.html.haml'
|
||||
- 'app/views/admin/application_settings/_visibility_and_access.html.haml'
|
||||
- 'app/views/admin/applications/_delete_form.html.haml'
|
||||
- 'app/views/admin/applications/_form.html.haml'
|
||||
- 'app/views/admin/applications/edit.html.haml'
|
||||
- 'app/views/admin/applications/index.html.haml'
|
||||
- 'app/views/admin/applications/new.html.haml'
|
||||
- 'app/views/admin/applications/show.html.haml'
|
||||
- 'app/views/admin/background_jobs/show.html.haml'
|
||||
- 'app/views/admin/broadcast_messages/index.html.haml'
|
||||
- 'app/views/admin/dashboard/index.html.haml'
|
||||
- 'app/views/admin/deploy_keys/new.html.haml'
|
||||
- 'app/views/admin/groups/show.html.haml'
|
||||
- 'app/views/admin/health_check/show.html.haml'
|
||||
- 'app/views/admin/hook_logs/_index.html.haml'
|
||||
- 'app/views/admin/hook_logs/show.html.haml'
|
||||
- 'app/views/admin/hooks/_form.html.haml'
|
||||
- 'app/views/admin/hooks/edit.html.haml'
|
||||
- 'app/views/admin/hooks/index.html.haml'
|
||||
- 'app/views/admin/labels/_form.html.haml'
|
||||
- 'app/views/admin/logs/show.html.haml'
|
||||
- 'app/views/admin/projects/_projects.html.haml'
|
||||
- 'app/views/admin/projects/show.html.haml'
|
||||
- 'app/views/admin/requests_profiles/index.html.haml'
|
||||
- 'app/views/admin/runners/_runner.html.haml'
|
||||
- 'app/views/admin/runners/index.html.haml'
|
||||
- 'app/views/admin/runners/show.html.haml'
|
||||
- 'app/views/admin/services/_form.html.haml'
|
||||
- 'app/views/admin/services/index.html.haml'
|
||||
- 'app/views/admin/spam_logs/_spam_log.html.haml'
|
||||
- 'app/views/admin/spam_logs/index.html.haml'
|
||||
- 'app/views/admin/system_info/show.html.haml'
|
||||
- 'app/views/admin/users/_access_levels.html.haml'
|
||||
- 'app/views/admin/users/_form.html.haml'
|
||||
- 'app/views/admin/users/_head.html.haml'
|
||||
- 'app/views/admin/users/_profile.html.haml'
|
||||
- 'app/views/admin/users/_projects.html.haml'
|
||||
- 'app/views/admin/users/new.html.haml'
|
||||
- 'app/views/admin/users/projects.html.haml'
|
||||
- 'app/views/admin/users/show.html.haml'
|
||||
- 'app/views/clusters/clusters/_cluster.html.haml'
|
||||
- 'app/views/clusters/clusters/_form.html.haml'
|
||||
- 'app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml'
|
||||
- 'app/views/clusters/clusters/gcp/_form.html.haml'
|
||||
- 'app/views/clusters/clusters/new.html.haml'
|
||||
- 'app/views/dashboard/milestones/index.html.haml'
|
||||
- 'app/views/dashboard/projects/_blank_state_admin_welcome.html.haml'
|
||||
- 'app/views/dashboard/projects/_blank_state_welcome.html.haml'
|
||||
- 'app/views/dashboard/projects/_zero_authorized_projects.html.haml'
|
||||
- 'app/views/dashboard/snippets/index.html.haml'
|
||||
- 'app/views/dashboard/todos/_todo.html.haml'
|
||||
- 'app/views/dashboard/todos/index.html.haml'
|
||||
- 'app/views/devise/confirmations/almost_there.haml'
|
||||
- 'app/views/devise/mailer/_confirmation_instructions_account.html.haml'
|
||||
- 'app/views/devise/mailer/_confirmation_instructions_secondary.html.haml'
|
||||
- 'app/views/devise/mailer/email_changed.html.haml'
|
||||
- 'app/views/devise/mailer/password_change.html.haml'
|
||||
- 'app/views/devise/mailer/reset_password_instructions.html.haml'
|
||||
- 'app/views/devise/mailer/unlock_instructions.html.haml'
|
||||
- 'app/views/devise/passwords/edit.html.haml'
|
||||
- 'app/views/devise/sessions/_new_base.html.haml'
|
||||
- 'app/views/devise/sessions/_new_crowd.html.haml'
|
||||
- 'app/views/devise/sessions/_new_ldap.html.haml'
|
||||
- 'app/views/devise/sessions/new.html.haml'
|
||||
- 'app/views/devise/sessions/two_factor.html.haml'
|
||||
- 'app/views/devise/shared/_omniauth_box.html.haml'
|
||||
- 'app/views/devise/shared/_sign_in_link.html.haml'
|
||||
- 'app/views/devise/shared/_signup_box.html.haml'
|
||||
- 'app/views/devise/shared/_tabs_normal.html.haml'
|
||||
- 'app/views/discussions/_discussion.html.haml'
|
||||
- 'app/views/discussions/_headline.html.haml'
|
||||
- 'app/views/discussions/_notes.html.haml'
|
||||
- 'app/views/discussions/_resolve_all.html.haml'
|
||||
- 'app/views/doorkeeper/applications/_delete_form.html.haml'
|
||||
- 'app/views/doorkeeper/authorized_applications/_delete_form.html.haml'
|
||||
- 'app/views/errors/encoding.html.haml'
|
||||
- 'app/views/errors/git_not_found.html.haml'
|
||||
- 'app/views/errors/omniauth_error.html.haml'
|
||||
- 'app/views/errors/precondition_failed.html.haml'
|
||||
- 'app/views/events/_commit.html.haml'
|
||||
- 'app/views/events/_event_push.atom.haml'
|
||||
- 'app/views/events/event/_push.html.haml'
|
||||
- 'app/views/groups/_create_chat_team.html.haml'
|
||||
- 'app/views/groups/_group_admin_settings.html.haml'
|
||||
- 'app/views/groups/group_members/_new_group_member.html.haml'
|
||||
- 'app/views/groups/group_members/index.html.haml'
|
||||
- 'app/views/groups/labels/edit.html.haml'
|
||||
- 'app/views/groups/labels/new.html.haml'
|
||||
- 'app/views/groups/milestones/edit.html.haml'
|
||||
- 'app/views/groups/milestones/index.html.haml'
|
||||
- 'app/views/groups/milestones/new.html.haml'
|
||||
- 'app/views/groups/projects.html.haml'
|
||||
- 'app/views/groups/runners/edit.html.haml'
|
||||
- 'app/views/groups/settings/_advanced.html.haml'
|
||||
- 'app/views/groups/settings/_lfs.html.haml'
|
||||
- 'app/views/help/_shortcuts.html.haml'
|
||||
- 'app/views/help/index.html.haml'
|
||||
- 'app/views/help/instance_configuration.html.haml'
|
||||
- 'app/views/help/instance_configuration/_gitlab_ci.html.haml'
|
||||
- 'app/views/help/instance_configuration/_gitlab_pages.html.haml'
|
||||
- 'app/views/help/instance_configuration/_ssh_info.html.haml'
|
||||
- 'app/views/help/ui.html.haml'
|
||||
- 'app/views/import/bitbucket/status.html.haml'
|
||||
- 'app/views/import/bitbucket_server/status.html.haml'
|
||||
- 'app/views/instance_statistics/cohorts/_cohorts_table.html.haml'
|
||||
- 'app/views/instance_statistics/cohorts/_usage_ping.html.haml'
|
||||
- 'app/views/invites/show.html.haml'
|
||||
- 'app/views/layouts/_mailer.html.haml'
|
||||
- 'app/views/layouts/header/_default.html.haml'
|
||||
- 'app/views/layouts/header/_new_dropdown.haml'
|
||||
- 'app/views/layouts/mailer/devise.html.haml'
|
||||
- 'app/views/layouts/nav/sidebar/_profile.html.haml'
|
||||
- 'app/views/layouts/notify.html.haml'
|
||||
- 'app/views/notify/_failed_builds.html.haml'
|
||||
- 'app/views/notify/_reassigned_issuable_email.html.haml'
|
||||
- 'app/views/notify/_removal_notification.html.haml'
|
||||
- 'app/views/notify/autodevops_disabled_email.html.haml'
|
||||
- 'app/views/notify/changed_milestone_email.html.haml'
|
||||
- 'app/views/notify/import_issues_csv_email.html.haml'
|
||||
- 'app/views/notify/issue_moved_email.html.haml'
|
||||
- 'app/views/notify/member_access_denied_email.html.haml'
|
||||
- 'app/views/notify/member_invite_accepted_email.html.haml'
|
||||
- 'app/views/notify/member_invite_declined_email.html.haml'
|
||||
- 'app/views/notify/member_invited_email.html.haml'
|
||||
- 'app/views/notify/new_gpg_key_email.html.haml'
|
||||
- 'app/views/notify/new_mention_in_issue_email.html.haml'
|
||||
- 'app/views/notify/new_ssh_key_email.html.haml'
|
||||
- 'app/views/notify/new_user_email.html.haml'
|
||||
- 'app/views/notify/pages_domain_disabled_email.html.haml'
|
||||
- 'app/views/notify/pages_domain_enabled_email.html.haml'
|
||||
- 'app/views/notify/pages_domain_verification_failed_email.html.haml'
|
||||
- 'app/views/notify/pages_domain_verification_succeeded_email.html.haml'
|
||||
- 'app/views/notify/pipeline_failed_email.html.haml'
|
||||
- 'app/views/notify/pipeline_success_email.html.haml'
|
||||
- 'app/views/notify/project_was_exported_email.html.haml'
|
||||
- 'app/views/notify/project_was_moved_email.html.haml'
|
||||
- 'app/views/notify/project_was_not_exported_email.html.haml'
|
||||
- 'app/views/notify/push_to_merge_request_email.html.haml'
|
||||
- 'app/views/notify/remote_mirror_update_failed_email.html.haml'
|
||||
- 'app/views/notify/removed_milestone_issue_email.html.haml'
|
||||
- 'app/views/notify/removed_milestone_merge_request_email.html.haml'
|
||||
- 'app/views/notify/repository_push_email.html.haml'
|
||||
- 'app/views/peek/views/_gc.html.haml'
|
||||
- 'app/views/peek/views/_redis.html.haml'
|
||||
- 'app/views/peek/views/_sidekiq.html.haml'
|
||||
- 'app/views/profiles/_event_table.html.haml'
|
||||
- 'app/views/profiles/active_sessions/_active_session.html.haml'
|
||||
- 'app/views/profiles/active_sessions/index.html.haml'
|
||||
- 'app/views/profiles/audit_log.html.haml'
|
||||
- 'app/views/profiles/chat_names/_chat_name.html.haml'
|
||||
- 'app/views/profiles/chat_names/index.html.haml'
|
||||
- 'app/views/profiles/chat_names/new.html.haml'
|
||||
- 'app/views/profiles/emails/index.html.haml'
|
||||
- 'app/views/profiles/gpg_keys/_key.html.haml'
|
||||
- 'app/views/profiles/gpg_keys/index.html.haml'
|
||||
- 'app/views/profiles/keys/_key.html.haml'
|
||||
- 'app/views/profiles/keys/_key_details.html.haml'
|
||||
- 'app/views/profiles/keys/index.html.haml'
|
||||
- 'app/views/profiles/notifications/show.html.haml'
|
||||
- 'app/views/profiles/passwords/edit.html.haml'
|
||||
- 'app/views/profiles/personal_access_tokens/index.html.haml'
|
||||
- 'app/views/profiles/preferences/show.html.haml'
|
||||
- 'app/views/profiles/show.html.haml'
|
||||
- 'app/views/profiles/two_factor_auths/_codes.html.haml'
|
||||
- 'app/views/profiles/two_factor_auths/codes.html.haml'
|
||||
- 'app/views/profiles/two_factor_auths/create.html.haml'
|
||||
- 'app/views/profiles/two_factor_auths/show.html.haml'
|
||||
- 'app/views/projects/_bitbucket_import_modal.html.haml'
|
||||
- 'app/views/projects/_customize_workflow.html.haml'
|
||||
- 'app/views/projects/_deletion_failed.html.haml'
|
||||
- 'app/views/projects/_fork_suggestion.html.haml'
|
||||
- 'app/views/projects/_gitlab_import_modal.html.haml'
|
||||
- 'app/views/projects/_home_panel.html.haml'
|
||||
- 'app/views/projects/_import_project_pane.html.haml'
|
||||
- 'app/views/projects/_issuable_by_email.html.haml'
|
||||
- 'app/views/projects/_md_preview.html.haml'
|
||||
- 'app/views/projects/_new_project_fields.html.haml'
|
||||
- 'app/views/projects/_readme.html.haml'
|
||||
- 'app/views/projects/artifacts/_tree_file.html.haml'
|
||||
- 'app/views/projects/artifacts/browse.html.haml'
|
||||
- 'app/views/projects/blame/_age_map_legend.html.haml'
|
||||
- 'app/views/projects/blame/show.html.haml'
|
||||
- 'app/views/projects/blob/_editor.html.haml'
|
||||
- 'app/views/projects/blob/_header_content.html.haml'
|
||||
- 'app/views/projects/blob/_new_dir.html.haml'
|
||||
- 'app/views/projects/blob/_remove.html.haml'
|
||||
- 'app/views/projects/blob/_render_error.html.haml'
|
||||
- 'app/views/projects/blob/_template_selectors.html.haml'
|
||||
- 'app/views/projects/blob/_upload.html.haml'
|
||||
- 'app/views/projects/blob/edit.html.haml'
|
||||
- 'app/views/projects/blob/new.html.haml'
|
||||
- 'app/views/projects/blob/preview.html.haml'
|
||||
- 'app/views/projects/blob/viewers/_empty.html.haml'
|
||||
- 'app/views/projects/blob/viewers/_stl.html.haml'
|
||||
- 'app/views/projects/branches/_branch.html.haml'
|
||||
- 'app/views/projects/branches/_commit.html.haml'
|
||||
- 'app/views/projects/branches/_delete_protected_modal.html.haml'
|
||||
- 'app/views/projects/branches/new.html.haml'
|
||||
- 'app/views/projects/ci/builds/_build.html.haml'
|
||||
- 'app/views/projects/ci/lints/_create.html.haml'
|
||||
- 'app/views/projects/commit/_change.html.haml'
|
||||
- 'app/views/projects/commits/_commit.html.haml'
|
||||
- 'app/views/projects/commits/_inline_commit.html.haml'
|
||||
- 'app/views/projects/compare/_form.html.haml'
|
||||
- 'app/views/projects/compare/index.html.haml'
|
||||
- 'app/views/projects/cycle_analytics/_empty_stage.html.haml'
|
||||
- 'app/views/projects/cycle_analytics/_no_access.html.haml'
|
||||
- 'app/views/projects/cycle_analytics/_overview.html.haml'
|
||||
- 'app/views/projects/cycle_analytics/show.html.haml'
|
||||
- 'app/views/projects/deploy_keys/_form.html.haml'
|
||||
- 'app/views/projects/deploy_keys/_index.html.haml'
|
||||
- 'app/views/projects/deploy_keys/edit.html.haml'
|
||||
- 'app/views/projects/deploy_tokens/_revoke_modal.html.haml'
|
||||
- 'app/views/projects/deploy_tokens/_table.html.haml'
|
||||
- 'app/views/projects/deployments/_deployment.html.haml'
|
||||
- 'app/views/projects/diffs/_file_header.html.haml'
|
||||
- 'app/views/projects/diffs/_replaced_image_diff.html.haml'
|
||||
- 'app/views/projects/diffs/_stats.html.haml'
|
||||
- 'app/views/projects/empty.html.haml'
|
||||
- 'app/views/projects/environments/show.html.haml'
|
||||
- 'app/views/projects/forks/error.html.haml'
|
||||
- 'app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml'
|
||||
- 'app/views/projects/graphs/charts.html.haml'
|
||||
- 'app/views/projects/hook_logs/_index.html.haml'
|
||||
- 'app/views/projects/hook_logs/show.html.haml'
|
||||
- 'app/views/projects/hooks/_index.html.haml'
|
||||
- 'app/views/projects/hooks/edit.html.haml'
|
||||
- 'app/views/projects/imports/new.html.haml'
|
||||
- 'app/views/projects/imports/show.html.haml'
|
||||
- 'app/views/projects/issues/_issue.html.haml'
|
||||
- 'app/views/projects/issues/_new_branch.html.haml'
|
||||
- 'app/views/projects/issues/import_csv/_modal.html.haml'
|
||||
- 'app/views/projects/issues/show.html.haml'
|
||||
- 'app/views/projects/jobs/_header.html.haml'
|
||||
- 'app/views/projects/jobs/_table.html.haml'
|
||||
- 'app/views/projects/jobs/index.html.haml'
|
||||
- 'app/views/projects/labels/edit.html.haml'
|
||||
- 'app/views/projects/labels/new.html.haml'
|
||||
- 'app/views/projects/mattermosts/_no_teams.html.haml'
|
||||
- 'app/views/projects/mattermosts/_team_selection.html.haml'
|
||||
- 'app/views/projects/mattermosts/new.html.haml'
|
||||
- 'app/views/projects/merge_requests/_commits.html.haml'
|
||||
- 'app/views/projects/merge_requests/_discussion.html.haml'
|
||||
- 'app/views/projects/merge_requests/_how_to_merge.html.haml'
|
||||
- 'app/views/projects/merge_requests/_merge_request.html.haml'
|
||||
- 'app/views/projects/merge_requests/_mr_title.html.haml'
|
||||
- 'app/views/projects/merge_requests/conflicts/_commit_stats.html.haml'
|
||||
- 'app/views/projects/merge_requests/conflicts/_file_actions.html.haml'
|
||||
- 'app/views/projects/merge_requests/conflicts/_submit_form.html.haml'
|
||||
- 'app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml'
|
||||
- 'app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml'
|
||||
- 'app/views/projects/merge_requests/conflicts/show.html.haml'
|
||||
- 'app/views/projects/merge_requests/creations/_diffs.html.haml'
|
||||
- 'app/views/projects/merge_requests/creations/_new_compare.html.haml'
|
||||
- 'app/views/projects/merge_requests/creations/_new_submit.html.haml'
|
||||
- 'app/views/projects/merge_requests/diffs/_different_base.html.haml'
|
||||
- 'app/views/projects/merge_requests/diffs/_diffs.html.haml'
|
||||
- 'app/views/projects/merge_requests/diffs/_version_controls.html.haml'
|
||||
- 'app/views/projects/merge_requests/invalid.html.haml'
|
||||
- 'app/views/projects/merge_requests/widget/open/_error.html.haml'
|
||||
- 'app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml'
|
||||
- 'app/views/projects/mirrors/_ssh_host_keys.html.haml'
|
||||
- 'app/views/projects/new.html.haml'
|
||||
- 'app/views/projects/no_repo.html.haml'
|
||||
- 'app/views/projects/pages/_access.html.haml'
|
||||
- 'app/views/projects/pages/_destroy.haml'
|
||||
- 'app/views/projects/pages/_https_only.html.haml'
|
||||
- 'app/views/projects/pages/_list.html.haml'
|
||||
- 'app/views/projects/pages/_no_domains.html.haml'
|
||||
- 'app/views/projects/pages/_use.html.haml'
|
||||
- 'app/views/projects/pages/show.html.haml'
|
||||
- 'app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml'
|
||||
- 'app/views/projects/pipelines/_info.html.haml'
|
||||
- 'app/views/projects/pipelines/charts/_pipelines.haml'
|
||||
- 'app/views/projects/protected_branches/shared/_branches_list.html.haml'
|
||||
- 'app/views/projects/protected_branches/shared/_create_protected_branch.html.haml'
|
||||
- 'app/views/projects/protected_branches/shared/_dropdown.html.haml'
|
||||
- 'app/views/projects/protected_branches/shared/_index.html.haml'
|
||||
- 'app/views/projects/protected_branches/shared/_matching_branch.html.haml'
|
||||
- 'app/views/projects/protected_branches/shared/_protected_branch.html.haml'
|
||||
- 'app/views/projects/protected_branches/show.html.haml'
|
||||
- 'app/views/projects/protected_tags/shared/_create_protected_tag.html.haml'
|
||||
- 'app/views/projects/protected_tags/shared/_dropdown.html.haml'
|
||||
- 'app/views/projects/protected_tags/shared/_index.html.haml'
|
||||
- 'app/views/projects/protected_tags/shared/_matching_tag.html.haml'
|
||||
- 'app/views/projects/protected_tags/shared/_protected_tag.html.haml'
|
||||
- 'app/views/projects/protected_tags/shared/_tags_list.html.haml'
|
||||
- 'app/views/projects/protected_tags/show.html.haml'
|
||||
- 'app/views/projects/registry/repositories/_tag.html.haml'
|
||||
- 'app/views/projects/repositories/_feed.html.haml'
|
||||
- 'app/views/projects/runners/_shared_runners.html.haml'
|
||||
- 'app/views/projects/runners/edit.html.haml'
|
||||
- 'app/views/projects/services/_form.html.haml'
|
||||
- 'app/views/projects/services/_index.html.haml'
|
||||
- 'app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml'
|
||||
- 'app/views/projects/services/mattermost_slash_commands/_help.html.haml'
|
||||
- 'app/views/projects/services/prometheus/_metrics.html.haml'
|
||||
- 'app/views/projects/services/slack_slash_commands/_help.html.haml'
|
||||
- 'app/views/projects/settings/ci_cd/_badge.html.haml'
|
||||
- 'app/views/projects/settings/ci_cd/_form.html.haml'
|
||||
- 'app/views/projects/stage/_stage.html.haml'
|
||||
- 'app/views/projects/tags/index.html.haml'
|
||||
- 'app/views/projects/tags/new.html.haml'
|
||||
- 'app/views/projects/tags/releases/edit.html.haml'
|
||||
- 'app/views/projects/tree/_tree_row.html.haml'
|
||||
- 'app/views/projects/tree/_truncated_notice_tree_row.html.haml'
|
||||
- 'app/views/projects/triggers/_content.html.haml'
|
||||
- 'app/views/projects/triggers/_form.html.haml'
|
||||
- 'app/views/projects/triggers/_index.html.haml'
|
||||
- 'app/views/projects/triggers/_trigger.html.haml'
|
||||
- 'app/views/projects/triggers/edit.html.haml'
|
||||
- 'app/views/projects/wikis/_new.html.haml'
|
||||
- 'app/views/projects/wikis/_pages_wiki_page.html.haml'
|
||||
- 'app/views/projects/wikis/edit.html.haml'
|
||||
- 'app/views/projects/wikis/history.html.haml'
|
||||
- 'app/views/repository_check_mailer/notify.html.haml'
|
||||
- 'app/views/search/_form.html.haml'
|
||||
- 'app/views/search/results/_issue.html.haml'
|
||||
- 'app/views/search/results/_note.html.haml'
|
||||
- 'app/views/search/results/_snippet_blob.html.haml'
|
||||
- 'app/views/search/results/_snippet_title.html.haml'
|
||||
- 'app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml'
|
||||
- 'app/views/shared/_commit_message_container.html.haml'
|
||||
- 'app/views/shared/_confirm_modal.html.haml'
|
||||
- 'app/views/shared/_delete_label_modal.html.haml'
|
||||
- 'app/views/shared/_group_form.html.haml'
|
||||
- 'app/views/shared/_group_tips.html.haml'
|
||||
- 'app/views/shared/_milestone_expired.html.haml'
|
||||
- 'app/views/shared/_no_password.html.haml'
|
||||
- 'app/views/shared/_no_ssh.html.haml'
|
||||
- 'app/views/shared/_outdated_browser.html.haml'
|
||||
- 'app/views/shared/_personal_access_tokens_created_container.html.haml'
|
||||
- 'app/views/shared/_personal_access_tokens_table.html.haml'
|
||||
- 'app/views/shared/_ping_consent.html.haml'
|
||||
- 'app/views/shared/_project_limit.html.haml'
|
||||
- 'app/views/shared/_service_settings.html.haml'
|
||||
- 'app/views/shared/boards/components/_board.html.haml'
|
||||
- 'app/views/shared/boards/components/_sidebar.html.haml'
|
||||
- 'app/views/shared/boards/components/sidebar/_due_date.html.haml'
|
||||
- 'app/views/shared/boards/components/sidebar/_labels.html.haml'
|
||||
- 'app/views/shared/boards/components/sidebar/_milestone.html.haml'
|
||||
- 'app/views/shared/empty_states/_priority_labels.html.haml'
|
||||
- 'app/views/shared/hook_logs/_content.html.haml'
|
||||
- 'app/views/shared/issuable/_assignees.html.haml'
|
||||
- 'app/views/shared/issuable/_board_create_list_dropdown.html.haml'
|
||||
- 'app/views/shared/issuable/_bulk_update_sidebar.html.haml'
|
||||
- 'app/views/shared/issuable/_close_reopen_report_toggle.html.haml'
|
||||
- 'app/views/shared/issuable/_form.html.haml'
|
||||
- 'app/views/shared/issuable/_search_bar.html.haml'
|
||||
- 'app/views/shared/issuable/_sidebar.html.haml'
|
||||
- 'app/views/shared/issuable/form/_default_templates.html.haml'
|
||||
- 'app/views/shared/issuable/form/_issue_assignee.html.haml'
|
||||
- 'app/views/shared/issuable/form/_template_selector.html.haml'
|
||||
- 'app/views/shared/issuable/form/_title.html.haml'
|
||||
- 'app/views/shared/labels/_form.html.haml'
|
||||
- 'app/views/shared/members/_member.html.haml'
|
||||
- 'app/views/shared/milestones/_form_dates.html.haml'
|
||||
- 'app/views/shared/milestones/_issuable.html.haml'
|
||||
- 'app/views/shared/milestones/_milestone.html.haml'
|
||||
- 'app/views/shared/milestones/_sidebar.html.haml'
|
||||
- 'app/views/shared/milestones/_top.html.haml'
|
||||
- 'app/views/shared/notes/_hints.html.haml'
|
||||
- 'app/views/shared/notes/_note.html.haml'
|
||||
- 'app/views/shared/notifications/_button.html.haml'
|
||||
- 'app/views/shared/notifications/_custom_notifications.html.haml'
|
||||
- 'app/views/shared/notifications/_new_button.html.haml'
|
||||
- 'app/views/shared/notifications/_notification_dropdown.html.haml'
|
||||
- 'app/views/shared/plugins/_index.html.haml'
|
||||
- 'app/views/shared/projects/_dropdown.html.haml'
|
||||
- 'app/views/shared/projects/_list.html.haml'
|
||||
- 'app/views/shared/projects/_project.html.haml'
|
||||
- 'app/views/shared/runners/_runner_description.html.haml'
|
||||
- 'app/views/shared/runners/show.html.haml'
|
||||
- 'app/views/shared/snippets/_embed.html.haml'
|
||||
- 'app/views/shared/snippets/_header.html.haml'
|
||||
- 'app/views/shared/snippets/_snippet.html.haml'
|
||||
- 'app/views/shared/tokens/_scopes_list.html.haml'
|
||||
- 'app/views/shared/web_hooks/_form.html.haml'
|
||||
- 'app/views/shared/web_hooks/_test_button.html.haml'
|
||||
- 'app/views/u2f/_authenticate.html.haml'
|
||||
- 'app/views/u2f/_register.html.haml'
|
||||
- 'app/views/users/_deletion_guidance.html.haml'
|
||||
- 'ee/app/views/admin/_namespace_plan_info.html.haml'
|
||||
- 'ee/app/views/admin/application_settings/_elasticsearch_form.html.haml'
|
||||
- 'ee/app/views/admin/application_settings/_slack.html.haml'
|
||||
- 'ee/app/views/admin/application_settings/_snowplow.html.haml'
|
||||
- 'ee/app/views/admin/application_settings/_templates.html.haml'
|
||||
- 'ee/app/views/admin/audit_logs/index.html.haml'
|
||||
- 'ee/app/views/admin/dashboard/stats.html.haml'
|
||||
- 'ee/app/views/admin/emails/show.html.haml'
|
||||
- 'ee/app/views/admin/geo/nodes/edit.html.haml'
|
||||
- 'ee/app/views/admin/geo/nodes/new.html.haml'
|
||||
- 'ee/app/views/admin/geo/projects/_registry_failed.html.haml'
|
||||
- 'ee/app/views/admin/geo/projects/_registry_never.html.haml'
|
||||
- 'ee/app/views/admin/licenses/_breakdown.html.haml'
|
||||
- 'ee/app/views/admin/licenses/_upload_trial_license.html.haml'
|
||||
- 'ee/app/views/admin/licenses/missing.html.haml'
|
||||
- 'ee/app/views/admin/licenses/new.html.haml'
|
||||
- 'ee/app/views/admin/licenses/show.html.haml'
|
||||
- 'ee/app/views/admin/monitoring/ee/_nav.html.haml'
|
||||
- 'ee/app/views/admin/projects/_shared_runner_status.html.haml'
|
||||
- 'ee/app/views/admin/push_rules/show.html.haml'
|
||||
- 'ee/app/views/admin/users/_limits.html.haml'
|
||||
- 'ee/app/views/admin/users/_user_detail_note.html.haml'
|
||||
- 'ee/app/views/dashboard/projects/_blank_state_ee_trial.html.haml'
|
||||
- 'ee/app/views/errors/kerberos_denied.html.haml'
|
||||
- 'ee/app/views/groups/analytics/show.html.haml'
|
||||
- 'ee/app/views/groups/audit_events/index.html.haml'
|
||||
- 'ee/app/views/groups/ee/_settings_nav.html.haml'
|
||||
- 'ee/app/views/groups/epics/_epic.html.haml'
|
||||
- 'ee/app/views/groups/group_members/_ldap_sync.html.haml'
|
||||
- 'ee/app/views/groups/group_members/_sync_button.html.haml'
|
||||
- 'ee/app/views/groups/hooks/_project_hook.html.haml'
|
||||
- 'ee/app/views/groups/hooks/index.html.haml'
|
||||
- 'ee/app/views/groups/ldap_group_links/index.html.haml'
|
||||
- 'ee/app/views/groups/pipeline_quota/index.html.haml'
|
||||
- 'ee/app/views/jira_connect/subscriptions/index.html.haml'
|
||||
- 'ee/app/views/layouts/jira_connect.html.haml'
|
||||
- 'ee/app/views/layouts/nav/ee/_epic_link.html.haml'
|
||||
- 'ee/app/views/layouts/nav/ee/admin/_new_monitoring_sidebar.html.haml'
|
||||
- 'ee/app/views/layouts/service_desk.html.haml'
|
||||
- 'ee/app/views/ldap_group_links/_form.html.haml'
|
||||
- 'ee/app/views/ldap_group_links/_ldap_group_link.html.haml'
|
||||
- 'ee/app/views/ldap_group_links/_ldap_group_links.html.haml'
|
||||
- 'ee/app/views/ldap_group_links/_ldap_group_links_show.html.haml'
|
||||
- 'ee/app/views/ldap_group_links/_ldap_group_links_synchronizations.html.haml'
|
||||
- 'ee/app/views/namespaces/_shared_runner_status.html.haml'
|
||||
- 'ee/app/views/namespaces/_shared_runners_minutes_setting.html.haml'
|
||||
- 'ee/app/views/namespaces/pipelines_quota/_extra_shared_runners_minutes_quota.html.haml'
|
||||
- 'ee/app/views/namespaces/pipelines_quota/_list.haml'
|
||||
- 'ee/app/views/notify/approved_merge_request_email.html.haml'
|
||||
- 'ee/app/views/notify/epic_status_changed_email.html.haml'
|
||||
- 'ee/app/views/notify/issues_csv_email.html.haml'
|
||||
- 'ee/app/views/notify/new_review_email.html.haml'
|
||||
- 'ee/app/views/notify/prometheus_alert_fired_email.html.haml'
|
||||
- 'ee/app/views/notify/send_admin_notification.html.haml'
|
||||
- 'ee/app/views/notify/send_unsubscribed_notification.html.haml'
|
||||
- 'ee/app/views/notify/unapproved_merge_request_email.html.haml'
|
||||
- 'ee/app/views/oauth/geo_auth/error.html.haml'
|
||||
- 'ee/app/views/profiles/pipeline_quota/index.haml'
|
||||
- 'ee/app/views/projects/audit_events/index.html.haml'
|
||||
- 'ee/app/views/projects/blob/_owners.html.haml'
|
||||
- 'ee/app/views/projects/commits/_mirror_status.html.haml'
|
||||
- 'ee/app/views/projects/feature_flags/_configure_feature_flags_modal.html.haml'
|
||||
- 'ee/app/views/projects/issues/_issue_weight.html.haml'
|
||||
- 'ee/app/views/projects/issues/_related_issues.html.haml'
|
||||
- 'ee/app/views/projects/issues/export_csv/_modal.html.haml'
|
||||
- 'ee/app/views/projects/jobs/_shared_runner_limit_warning.html.haml'
|
||||
- 'ee/app/views/projects/merge_requests/_approvals_count.html.haml'
|
||||
- 'ee/app/views/projects/merge_requests/widget/open/_geo.html.haml'
|
||||
- 'ee/app/views/projects/mirrors/_mirrored_repositories_count.html.haml'
|
||||
- 'ee/app/views/projects/protected_branches/ee/_create_protected_branch.html.haml'
|
||||
- 'ee/app/views/projects/protected_branches/ee/_dropdown.html.haml'
|
||||
- 'ee/app/views/projects/protected_branches/ee/_fallback_update_protected_branch.html.haml'
|
||||
- 'ee/app/views/projects/protected_tags/_protected_tag_extra_create_access_levels.haml'
|
||||
- 'ee/app/views/projects/protected_tags/ee/_create_protected_tag.html.haml'
|
||||
- 'ee/app/views/projects/push_rules/_index.html.haml'
|
||||
- 'ee/app/views/projects/services/gitlab_slack_application/_help.html.haml'
|
||||
- 'ee/app/views/projects/services/gitlab_slack_application/_slack_integration_form.html.haml'
|
||||
- 'ee/app/views/projects/services/prometheus/_metrics.html.haml'
|
||||
- 'ee/app/views/projects/settings/slacks/edit.html.haml'
|
||||
- 'ee/app/views/shared/_additional_email_text.html.haml'
|
||||
- 'ee/app/views/shared/_geo_info_modal.html.haml'
|
||||
- 'ee/app/views/shared/_mirror_update_button.html.haml'
|
||||
- 'ee/app/views/shared/_shared_runners_minutes_limit.html.haml'
|
||||
- 'ee/app/views/shared/audit_events/_event_table.html.haml'
|
||||
- 'ee/app/views/shared/boards/components/_list_weight.html.haml'
|
||||
- 'ee/app/views/shared/boards/components/sidebar/_epic.html.haml'
|
||||
- 'ee/app/views/shared/ee/_import_form.html.haml'
|
||||
- 'ee/app/views/shared/epic/_search_bar.html.haml'
|
||||
- 'ee/app/views/shared/issuable/_approvals.html.haml'
|
||||
- 'ee/app/views/shared/issuable/_board_create_list_dropdown.html.haml'
|
||||
- 'ee/app/views/shared/issuable/_filter_weight.html.haml'
|
||||
- 'ee/app/views/shared/issuable/_sidebar_item_epic.haml'
|
||||
- 'ee/app/views/shared/members/ee/_ldap_tag.html.haml'
|
||||
- 'ee/app/views/shared/members/ee/_override_member_buttons.html.haml'
|
||||
- 'ee/app/views/shared/members/ee/_sso_badge.html.haml'
|
||||
- 'ee/app/views/shared/milestones/_burndown.html.haml'
|
||||
- 'ee/app/views/shared/milestones/_weight.html.haml'
|
||||
- 'ee/app/views/shared/promotions/_promote_audit_events.html.haml'
|
||||
- 'ee/app/views/shared/promotions/_promote_burndown_charts.html.haml'
|
||||
- 'ee/app/views/shared/promotions/_promote_csv_export.html.haml'
|
||||
- 'ee/app/views/shared/promotions/_promote_issue_weights.html.haml'
|
||||
- 'ee/app/views/shared/promotions/_promote_repository_features.html.haml'
|
||||
- 'ee/app/views/shared/promotions/_promote_servicedesk.html.haml'
|
||||
- 'ee/app/views/shared/push_rules/_form.html.haml'
|
||||
- 'ee/app/views/unsubscribes/show.html.haml'
|
||||
- 'ee/app/views/admin/users/_auditor_access_level_radio.html.haml'
|
||||
- 'ee/app/views/admin/users/_auditor_user_badge.html.haml'
|
||||
- 'ee/app/views/projects/protected_branches/_update_protected_branch.html.haml'
|
||||
- 'ee/app/views/analytics/cycle_analytics/show.html.haml'
|
9
.license_encryption_key.pub
Normal file
9
.license_encryption_key.pub
Normal file
|
@ -0,0 +1,9 @@
|
|||
-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Hxv3MkkZbMrKtIs6np9
|
||||
ccP4OwGBkNhIvhPjcQP48hbbascv5RqsOquQGrYSD2ZrE/kbkRdkIcoHEeTZLif+
|
||||
bDKFZFI7o5x0H92o9/GSvxHJhQ8mkmvwxD7lssGShwZEm8WG+U7BZqUV/gGmCDqe
|
||||
9W8H8Fq2B0ck8IXjbQ4Zz+JlyV/NHZTZcs69plFiLKh4N6GYVftOVwSomh0bbypP
|
||||
OB9WnLC7RC9a2LRrhtf8sqa2rRFmtyMMfgFFzLMzS+w+1K4+QLnWP1gKQVzaFnzk
|
||||
pnwKPrqbGFYbRztIVEWbs8jPYlLkGb8ME4C84YVtQgbQcbyisU/VW3wUGkhT+J0k
|
||||
xwIDAQAB
|
||||
-----END PUBLIC KEY-----
|
30
.markdownlint.json
Normal file
30
.markdownlint.json
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"default": true,
|
||||
"first-header-h1": true,
|
||||
"header-style": {
|
||||
"style": "atx"
|
||||
},
|
||||
"ul-style": {
|
||||
"style": "dash"
|
||||
},
|
||||
"line-length": false,
|
||||
"no-duplicate-header": {
|
||||
"allow_different_nesting": true
|
||||
},
|
||||
"no-trailing-punctuation": {
|
||||
"punctuation": ".,;:!。,;:!?"
|
||||
},
|
||||
"ol-prefix": {
|
||||
"style": "one"
|
||||
},
|
||||
"no-inline-html": false,
|
||||
"hr-style": {
|
||||
"style": "---"
|
||||
},
|
||||
"no-emphasis-as-heading": false,
|
||||
"fenced-code-language": false,
|
||||
"first-line-h1": false,
|
||||
"code-block-style": {
|
||||
"style": "fenced"
|
||||
}
|
||||
}
|
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
|||
10.13.0
|
||||
12.4.0
|
||||
|
|
28
.overcommit.yml.example
Normal file
28
.overcommit.yml.example
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Use this file to configure the Overcommit hooks you wish to use. This will
|
||||
# extend the default configuration defined in:
|
||||
# https://github.com/sds/overcommit/blob/master/config/default.yml
|
||||
#
|
||||
# At the topmost level of this YAML file is a key representing type of hook
|
||||
# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
|
||||
# customize each hook, such as whether to only run it on certain files (via
|
||||
# `include`), whether to only display output if it fails (via `quiet`), etc.
|
||||
#
|
||||
# For a complete list of hooks, see:
|
||||
# https://github.com/sds/overcommit/tree/master/lib/overcommit/hook
|
||||
#
|
||||
# For a complete list of options that you can use to customize hooks, see:
|
||||
# https://github.com/sds/overcommit#configuration
|
||||
#
|
||||
# Uncomment the following lines to make the configuration take effect.
|
||||
|
||||
PreCommit:
|
||||
RuboCop:
|
||||
enabled: true
|
||||
# on_warn: fail # Treat all warnings as failures
|
||||
#
|
||||
#PostCheckout:
|
||||
# ALL: # Special hook name that customizes all hooks of this type
|
||||
# quiet: true # Change all post-checkout hooks to only display output on failure
|
||||
#
|
||||
# IndexTags:
|
||||
# enabled: true # Generate a tags file with `ctags` each time HEAD changes
|
|
@ -3,8 +3,8 @@ group: git
|
|||
services:
|
||||
- postgres
|
||||
before_precompile: ./bin/pkgr_before_precompile.sh
|
||||
env:
|
||||
- SKIP_STORAGE_VALIDATION=true
|
||||
env:
|
||||
- SKIP_STORAGE_VALIDATION=true
|
||||
targets:
|
||||
debian-7: &wheezy
|
||||
build_dependencies:
|
||||
|
|
|
@ -7,3 +7,4 @@
|
|||
# ignore stylesheets for now as this clashes with our linter
|
||||
*.css
|
||||
*.scss
|
||||
*.md
|
||||
|
|
10
.prettierrc
10
.prettierrc
|
@ -1,13 +1,5 @@
|
|||
{
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["**/app/**/*", "**/spec/**/*"],
|
||||
"options": {
|
||||
"trailingComma": "all"
|
||||
}
|
||||
}
|
||||
]
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
|
112
.rubocop.yml
112
.rubocop.yml
|
@ -8,6 +8,7 @@ require:
|
|||
- rubocop-rspec
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.6
|
||||
TargetRailsVersion: 5.0
|
||||
Exclude:
|
||||
- 'vendor/**/*'
|
||||
|
@ -49,7 +50,9 @@ Style/FrozenStringLiteralComment:
|
|||
- 'config/**/*'
|
||||
- 'danger/**/*'
|
||||
- 'db/**/*'
|
||||
- 'ee/**/*'
|
||||
- 'ee/db/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
- 'ee/lib/tasks/**/*'
|
||||
- 'lib/tasks/**/*'
|
||||
- 'qa/**/*'
|
||||
- 'rubocop/**/*'
|
||||
|
@ -59,8 +62,8 @@ Style/FrozenStringLiteralComment:
|
|||
RSpec/FilePath:
|
||||
Exclude:
|
||||
- 'qa/**/*'
|
||||
- 'spec/javascripts/fixtures/*'
|
||||
- 'ee/spec/javascripts/fixtures/*'
|
||||
- 'spec/frontend/fixtures/*'
|
||||
- 'ee/spec/frontend/fixtures/*'
|
||||
- 'spec/requests/api/v3/*'
|
||||
|
||||
Naming/FileName:
|
||||
|
@ -74,6 +77,7 @@ Naming/FileName:
|
|||
- 'qa/spec/**/*'
|
||||
- 'qa/qa/specs/**/*'
|
||||
- 'qa/bin/*'
|
||||
- 'ee/bin/*'
|
||||
- 'config/**/*'
|
||||
- 'ee/config/**/*'
|
||||
- 'lib/generators/**/*'
|
||||
|
@ -89,6 +93,7 @@ Naming/FileName:
|
|||
- JSON
|
||||
- LDAP
|
||||
- SAML
|
||||
- SSO
|
||||
- IO
|
||||
- HMAC
|
||||
- QA
|
||||
|
@ -145,6 +150,20 @@ Naming/FileName:
|
|||
- XSS
|
||||
- GRPC
|
||||
|
||||
Rails/ApplicationRecord:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
# Models in database migrations should not subclass from ApplicationRecord
|
||||
# as they need to be as decoupled from application code as possible
|
||||
- db/**/*.rb
|
||||
- lib/gitlab/background_migration/**/*.rb
|
||||
- lib/gitlab/database/**/*.rb
|
||||
- spec/**/*.rb
|
||||
- ee/db/**/*.rb
|
||||
- ee/lib/gitlab/background_migration/**/*.rb
|
||||
- ee/lib/ee/gitlab/background_migration/**/*.rb
|
||||
- ee/spec/**/*.rb
|
||||
|
||||
# GitLab ###################################################################
|
||||
|
||||
Gitlab/ModuleWithInstanceVariables:
|
||||
|
@ -162,6 +181,9 @@ Gitlab/ModuleWithInstanceVariables:
|
|||
|
||||
Gitlab/HTTParty:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
|
||||
GitlabSecurity/PublicSend:
|
||||
Enabled: true
|
||||
|
@ -181,3 +203,87 @@ Cop/InjectEnterpriseEditionModule:
|
|||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
|
||||
Style/ReturnNil:
|
||||
Enabled: true
|
||||
|
||||
# It isn't always safe to replace `=~` with `.match?`, especially when there are
|
||||
# nil values on the left hand side
|
||||
Performance/RegexpMatch:
|
||||
Enabled: false
|
||||
|
||||
ActiveRecordAssociationReload:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
|
||||
RSpec/FactoriesInMigrationSpecs:
|
||||
Enabled: true
|
||||
Include:
|
||||
- 'spec/migrations/**/*.rb'
|
||||
- 'ee/spec/migrations/**/*.rb'
|
||||
- 'spec/lib/gitlab/background_migration/**/*.rb'
|
||||
- 'ee/spec/lib/gitlab/background_migration/**/*.rb'
|
||||
|
||||
Cop/IncludeActionViewContext:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
|
||||
Cop/IncludeSidekiqWorker:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
|
||||
Gitlab/Union:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'ee/spec/**/*'
|
||||
|
||||
Cop/SidekiqOptionsQueue:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*.rb'
|
||||
- 'ee/spec/**/*.rb'
|
||||
|
||||
Graphql/AuthorizeTypes:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*.rb'
|
||||
- 'ee/spec/**/*.rb'
|
||||
|
||||
RSpec/EnvAssignment:
|
||||
Enable: true
|
||||
Include:
|
||||
- 'spec/**/*.rb'
|
||||
- 'ee/spec/**/*.rb'
|
||||
Exclude:
|
||||
- 'spec/**/fast_spec_helper.rb'
|
||||
- 'ee/spec/**/fast_spec_helper.rb'
|
||||
- 'spec/**/spec_helper.rb'
|
||||
- 'ee/spec/**/spec_helper.rb'
|
||||
RSpec/BeSuccessMatcher:
|
||||
Enabled: true
|
||||
Include:
|
||||
- 'spec/controllers/**/*'
|
||||
- 'ee/spec/controllers/**/*'
|
||||
- 'spec/support/shared_examples/controllers/**/*'
|
||||
- 'ee/spec/support/shared_examples/controllers/**/*'
|
||||
- 'spec/support/controllers/**/*'
|
||||
- 'ee/spec/support/controllers/**/*'
|
||||
|
||||
Scalability/FileUploads:
|
||||
Enabled: true
|
||||
Include:
|
||||
- 'lib/api/**/*.rb'
|
||||
- 'ee/lib/api/**/*.rb'
|
||||
|
||||
Graphql/Descriptions:
|
||||
Enabled: true
|
||||
Include:
|
||||
- 'app/graphql/**/*'
|
||||
- 'ee/app/graphql/**/*'
|
||||
|
|
|
@ -1,42 +1,154 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2018-01-18 18:23:26 +0100 using RuboCop version 0.52.1.
|
||||
# on 2019-05-04 16:01:00 +0000 using RuboCop version 0.68.1.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 181
|
||||
# Offense count: 264
|
||||
Capybara/CurrentPathExpectation:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 167
|
||||
# Offense count: 1097
|
||||
# Cop supports --auto-correct.
|
||||
Layout/EmptyLinesAroundArguments:
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: with_first_argument, with_fixed_indentation
|
||||
Layout/AlignArguments:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 83
|
||||
# Offense count: 824
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
# SupportedColonStyles: key, separator, table
|
||||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||
Layout/AlignHash:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 13
|
||||
# Cop supports --auto-correct.
|
||||
Layout/ClosingHeredocIndentation:
|
||||
Exclude:
|
||||
- 'app/graphql/mutations/merge_requests/set_wip.rb'
|
||||
- 'ee/db/geo/migrate/20180322062741_migrate_ci_job_artifacts_to_separate_registry.rb'
|
||||
- 'ee/db/migrate/20160204190809_update_jenkins_service_category.rb'
|
||||
- 'ee/lib/gitlab/background_migration/prune_orphaned_geo_events.rb'
|
||||
- 'ee/lib/gitlab/geo/health_check.rb'
|
||||
- 'lib/gitlab/background_migration/populate_untracked_uploads.rb'
|
||||
- 'qa/qa/service/kubernetes_cluster.rb'
|
||||
- 'spec/features/merge_request/user_sees_diff_spec.rb'
|
||||
- 'spec/lib/gitlab/asciidoc_spec.rb'
|
||||
- 'spec/lib/gitlab/checks/project_moved_spec.rb'
|
||||
- 'spec/rubocop/cop/active_record_association_reload_spec.rb'
|
||||
- 'spec/services/task_list_toggle_service_spec.rb'
|
||||
|
||||
# Offense count: 14
|
||||
# Cop supports --auto-correct.
|
||||
Layout/ClosingParenthesisIndentation:
|
||||
Exclude:
|
||||
- 'db/post_migrate/20180704145007_update_project_indexes.rb'
|
||||
- 'ee/db/geo/migrate/20180405074130_add_partial_index_project_repository_verification.rb'
|
||||
- 'ee/db/migrate/20180308234102_add_partial_index_to_project_repository_states_checksum_columns.rb'
|
||||
- 'ee/db/post_migrate/20180605213516_fix_partial_index_to_project_repository_states_checksum_columns.rb'
|
||||
- 'ee/lib/ee/gitlab/usage_data.rb'
|
||||
- 'spec/services/issues/resolve_discussions_spec.rb'
|
||||
- 'spec/services/projects/update_service_spec.rb'
|
||||
- 'spec/support/helpers/stub_object_storage.rb'
|
||||
- 'spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: leading, trailing
|
||||
Layout/DotPosition:
|
||||
Exclude:
|
||||
- 'app/models/concerns/relative_positioning.rb'
|
||||
- 'app/models/group.rb'
|
||||
|
||||
# Offense count: 69
|
||||
# Cop supports --auto-correct.
|
||||
Layout/EmptyLinesAroundArguments:
|
||||
Exclude:
|
||||
- 'app/models/concerns/discussion_on_diff.rb'
|
||||
- 'app/models/concerns/resolvable_discussion.rb'
|
||||
- 'app/models/diff_discussion.rb'
|
||||
- 'app/models/discussion.rb'
|
||||
- 'ee/app/helpers/license_helper.rb'
|
||||
- 'ee/spec/models/geo/project_registry_spec.rb'
|
||||
- 'lib/banzai/pipeline/broadcast_message_pipeline.rb'
|
||||
- 'lib/banzai/pipeline/gfm_pipeline.rb'
|
||||
- 'lib/banzai/pipeline/single_line_pipeline.rb'
|
||||
- 'spec/features/markdown/copy_as_gfm_spec.rb'
|
||||
|
||||
# Offense count: 160
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
||||
Layout/IndentArray:
|
||||
Layout/IndentFirstArrayElement:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 237
|
||||
# Offense count: 631
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
||||
Layout/IndentHash:
|
||||
Layout/IndentFirstHashElement:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 93
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: consistent, align_parentheses
|
||||
Layout/IndentFirstParameter:
|
||||
Exclude:
|
||||
- 'app/models/ci/pipeline_schedule.rb'
|
||||
- 'lib/gitlab/cross_project_access.rb'
|
||||
- 'lib/gitlab/data_builder/push.rb'
|
||||
- 'spec/support/helpers/repo_helpers.rb'
|
||||
- 'spec/support/helpers/stub_object_storage.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
Layout/LeadingBlankLines:
|
||||
Exclude:
|
||||
- 'app/workers/update_project_statistics_worker.rb'
|
||||
- 'db/migrate/20161007073613_create_user_activities.rb'
|
||||
- 'ee/spec/helpers/boards_helper_spec.rb'
|
||||
- 'lib/tasks/yarn.rake'
|
||||
- 'spec/javascripts/fixtures/merge_requests_diffs.rb'
|
||||
|
||||
# Offense count: 30
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: aligned, indented
|
||||
Layout/MultilineOperationIndentation:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 13
|
||||
# Cop supports --auto-correct.
|
||||
Layout/RescueEnsureAlignment:
|
||||
Exclude:
|
||||
- 'app/models/blob_viewer/dependency_manager.rb'
|
||||
- 'app/models/ci/pipeline.rb'
|
||||
- 'app/models/project.rb'
|
||||
- 'app/services/prometheus/proxy_service.rb'
|
||||
- 'app/workers/delete_stored_files_worker.rb'
|
||||
- 'app/workers/reactive_caching_worker.rb'
|
||||
- 'config/initializers/1_settings.rb'
|
||||
- 'config/initializers/trusted_proxies.rb'
|
||||
- 'ee/db/migrate/20151113115819_canonicalize_kerberos_identities.rb'
|
||||
- 'lib/gitlab/background_migration/archive_legacy_traces.rb'
|
||||
- 'lib/gitlab/highlight.rb'
|
||||
- 'lib/tasks/gitlab/lfs/migrate.rake'
|
||||
|
||||
# Offense count: 344
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: require_no_space, require_space
|
||||
Layout/SpaceInLambdaLiteral:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 327
|
||||
# Offense count: 583
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
||||
# SupportedStyles: space, no_space
|
||||
|
@ -44,20 +156,27 @@ Layout/SpaceInLambdaLiteral:
|
|||
Layout/SpaceInsideBlockBraces:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 156
|
||||
# Offense count: 255
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: space, no_space
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 26
|
||||
# Offense count: 1
|
||||
Lint/DisjunctiveAssignmentInConstructor:
|
||||
Exclude:
|
||||
- 'app/models/uploads/base.rb'
|
||||
|
||||
# Offense count: 19
|
||||
Lint/DuplicateMethods:
|
||||
Exclude:
|
||||
- 'app/models/application_setting.rb'
|
||||
- 'app/models/commit.rb'
|
||||
- 'app/models/note.rb'
|
||||
- 'app/services/merge_requests/merge_service.rb'
|
||||
- 'lib/bitbucket/representation/repo.rb'
|
||||
- 'lib/declarative_policy/base.rb'
|
||||
- 'lib/gitlab/auth/ldap/person.rb'
|
||||
- 'lib/gitlab/auth/o_auth/user.rb'
|
||||
- 'lib/gitlab/ci/build/artifacts/metadata/entry.rb'
|
||||
- 'lib/gitlab/cycle_analytics/base_event_fetcher.rb'
|
||||
- 'lib/gitlab/diff/formatters/base_formatter.rb'
|
||||
|
@ -65,36 +184,60 @@ Lint/DuplicateMethods:
|
|||
- 'lib/gitlab/git/repository.rb'
|
||||
- 'lib/gitlab/git/tree.rb'
|
||||
- 'lib/gitlab/git/wiki_page.rb'
|
||||
- 'lib/gitlab/auth/ldap/person.rb'
|
||||
- 'lib/gitlab/auth/o_auth/user.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 2
|
||||
Lint/InterpolationCheck:
|
||||
Exclude:
|
||||
- 'spec/features/issues/filtered_search/filter_issues_spec.rb'
|
||||
- 'spec/features/users_spec.rb'
|
||||
- 'spec/services/quick_actions/interpret_service_spec.rb'
|
||||
|
||||
# Offense count: 206
|
||||
# Offense count: 326
|
||||
# Configuration parameters: MaximumRangeSize.
|
||||
Lint/MissingCopEnableDirective:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 9
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Whitelist.
|
||||
# Whitelist: present?, blank?, presence, try, try!
|
||||
Lint/SafeNavigationConsistency:
|
||||
Exclude:
|
||||
- 'lib/gitlab/gpg/commit.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Lint/ToJSON:
|
||||
Exclude:
|
||||
- 'lib/gitlab/cycle_analytics/usage_data.rb'
|
||||
- 'lib/gitlab/template/base_template.rb'
|
||||
|
||||
# Offense count: 7
|
||||
Lint/UriEscapeUnescape:
|
||||
Exclude:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/models/project_services/drone_ci_service.rb'
|
||||
- 'spec/lib/google_api/auth_spec.rb'
|
||||
- 'spec/requests/api/files_spec.rb'
|
||||
- 'spec/requests/api/internal_spec.rb'
|
||||
- 'spec/requests/api/issues_spec.rb'
|
||||
- 'spec/requests/api/internal/base_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
||||
Lint/Void:
|
||||
Exclude:
|
||||
- 'lib/gitlab/git/diff_collection.rb'
|
||||
|
||||
# Offense count: 158
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 1310
|
||||
Max: 176
|
||||
|
||||
# Offense count: 94
|
||||
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
||||
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
||||
Naming/FileName:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 11
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
|
@ -107,61 +250,66 @@ Naming/HeredocDelimiterCase:
|
|||
- 'spec/support/helpers/repo_helpers.rb'
|
||||
- 'spec/support/helpers/seed_repo.rb'
|
||||
|
||||
# Offense count: 112
|
||||
# Offense count: 197
|
||||
# Configuration parameters: Blacklist.
|
||||
# Blacklist: END, (?-mix:EO[A-Z]{1})
|
||||
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
||||
Naming/HeredocDelimiterNaming:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 125
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: PreferredName.
|
||||
Naming/RescuedExceptionsVariableName:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 3821
|
||||
# Offense count: 7081
|
||||
# Configuration parameters: Prefixes.
|
||||
# Prefixes: when, with, without
|
||||
RSpec/ContextWording:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 293
|
||||
# Offense count: 407
|
||||
# Cop supports --auto-correct.
|
||||
RSpec/EmptyLineAfterFinalLet:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 188
|
||||
# Offense count: 232
|
||||
# Cop supports --auto-correct.
|
||||
RSpec/EmptyLineAfterSubject:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 258
|
||||
# Offense count: 719
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: method_call, block
|
||||
RSpec/ExpectChange:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 221
|
||||
# Offense count: 512
|
||||
RSpec/ExpectInHook:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 19
|
||||
# Offense count: 10
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: it_behaves_like, it_should_behave_like
|
||||
RSpec/ItBehavesLike:
|
||||
Exclude:
|
||||
- 'spec/lib/gitlab/git/commit_spec.rb'
|
||||
- 'spec/lib/gitlab/git/repository_spec.rb'
|
||||
- 'spec/lib/gitlab/shell_spec.rb'
|
||||
- 'spec/services/notification_service_spec.rb'
|
||||
- 'spec/workers/git_garbage_collect_worker_spec.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Offense count: 3
|
||||
RSpec/IteratedExpectation:
|
||||
Exclude:
|
||||
- 'spec/features/admin/admin_settings_spec.rb'
|
||||
- 'spec/features/merge_requests/diff_notes_resolve_spec.rb'
|
||||
- 'spec/features/projects/awards/user_interacts_with_awards_in_issue_spec.rb'
|
||||
- 'spec/lib/gitlab/gitlab_import/client_spec.rb'
|
||||
- 'spec/lib/gitlab/legacy_github_import/client_spec.rb'
|
||||
|
||||
# Offense count: 75
|
||||
# Offense count: 68
|
||||
# Cop supports --auto-correct.
|
||||
RSpec/LetBeforeExamples:
|
||||
Exclude:
|
||||
- 'spec/controllers/projects/commit_controller_spec.rb'
|
||||
- 'spec/lib/banzai/filter/issue_reference_filter_spec.rb'
|
||||
- 'spec/lib/banzai/filter/user_reference_filter_spec.rb'
|
||||
- 'spec/lib/gitlab/email/handler/create_issue_handler_spec.rb'
|
||||
|
@ -170,12 +318,11 @@ RSpec/LetBeforeExamples:
|
|||
- 'spec/models/commit_range_spec.rb'
|
||||
- 'spec/models/milestone_spec.rb'
|
||||
- 'spec/models/project_services/packagist_service_spec.rb'
|
||||
- 'spec/models/repository_spec.rb'
|
||||
- 'spec/rubocop/cop/migration/update_column_in_batches_spec.rb'
|
||||
- 'spec/serializers/pipeline_details_entity_spec.rb'
|
||||
- 'spec/views/ci/lints/show.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
RSpec/MultipleSubjects:
|
||||
Exclude:
|
||||
- 'spec/services/merge_requests/create_from_issue_service_spec.rb'
|
||||
|
@ -188,95 +335,134 @@ RSpec/OverwritingSetup:
|
|||
- 'spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb'
|
||||
- 'spec/services/notes/quick_actions_service_spec.rb'
|
||||
|
||||
# Offense count: 965
|
||||
# Offense count: 1828
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Strict, EnforcedStyle.
|
||||
# SupportedStyles: inflected, explicit
|
||||
RSpec/PredicateMatcher:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 35
|
||||
# Offense count: 57
|
||||
RSpec/RepeatedExample:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 140
|
||||
# Offense count: 474
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: and_return, block
|
||||
RSpec/ReturnFromStub:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 112
|
||||
# Offense count: 188
|
||||
RSpec/ScatteredLet:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 22
|
||||
# Offense count: 10
|
||||
RSpec/ScatteredSetup:
|
||||
Exclude:
|
||||
- 'spec/controllers/projects/templates_controller_spec.rb'
|
||||
- 'spec/lib/gitlab/bitbucket_import/importer_spec.rb'
|
||||
- 'spec/lib/gitlab/git/env_spec.rb'
|
||||
- 'spec/requests/api/jobs_spec.rb'
|
||||
- 'spec/services/projects/create_service_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
RSpec/SharedContext:
|
||||
Exclude:
|
||||
- 'spec/features/admin/admin_groups_spec.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Offense count: 4
|
||||
RSpec/VoidExpect:
|
||||
Exclude:
|
||||
- 'spec/features/projects/artifacts/download_spec.rb'
|
||||
- 'spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb'
|
||||
- 'spec/models/ci/group_spec.rb'
|
||||
- 'spec/models/ci/runner_spec.rb'
|
||||
- 'spec/services/users/destroy_service_spec.rb'
|
||||
|
||||
# Offense count: 41
|
||||
# Offense count: 8
|
||||
# Cop supports --auto-correct.
|
||||
Rails/BelongsTo:
|
||||
Exclude:
|
||||
- 'app/models/deployment.rb'
|
||||
- 'app/models/environment.rb'
|
||||
- 'ee/app/models/prometheus_alert.rb'
|
||||
- 'ee/app/models/prometheus_alert_event.rb'
|
||||
|
||||
# Offense count: 80
|
||||
# Configuration parameters: Include.
|
||||
# Include: db/migrate/*.rb
|
||||
Rails/CreateTableWithTimestamps:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 155
|
||||
# Offense count: 222
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: slashes, arguments
|
||||
Rails/FilePath:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 121
|
||||
# Offense count: 167
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/HasManyOrHasOneDependent:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 157
|
||||
# Offense count: 40
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: numeric, symbolic
|
||||
Rails/HttpStatus:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/controllers/**/*.rb
|
||||
Rails/IgnoredSkipActionFilterOption:
|
||||
Exclude:
|
||||
- 'app/controllers/projects/snippets_controller.rb'
|
||||
- 'app/controllers/snippets_controller.rb'
|
||||
|
||||
# Offense count: 87
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/InverseOf:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 48
|
||||
# Offense count: 46
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/controllers/**/*.rb
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 14
|
||||
# Offense count: 4
|
||||
# Cop supports --auto-correct.
|
||||
Rails/LinkToBlank:
|
||||
Exclude:
|
||||
- 'app/helpers/projects_helper.rb'
|
||||
- 'app/helpers/wiki_helper.rb'
|
||||
- 'ee/app/helpers/ee/user_callouts_helper.rb'
|
||||
- 'ee/app/helpers/license_helper.rb'
|
||||
|
||||
# Offense count: 11
|
||||
# Cop supports --auto-correct.
|
||||
Rails/Presence:
|
||||
Exclude:
|
||||
- 'app/controllers/projects/blob_controller.rb'
|
||||
- 'app/models/ci/pipeline.rb'
|
||||
- 'app/models/clusters/platforms/kubernetes.rb'
|
||||
- 'app/models/concerns/mentionable.rb'
|
||||
- 'app/models/concerns/token_authenticatable.rb'
|
||||
- 'app/models/project_services/hipchat_service.rb'
|
||||
- 'app/models/project_services/irker_service.rb'
|
||||
- 'app/models/project_services/jira_service.rb'
|
||||
- 'app/models/project_services/kubernetes_service.rb'
|
||||
- 'app/models/project_services/packagist_service.rb'
|
||||
- 'app/models/wiki_page.rb'
|
||||
- 'lib/gitlab/git/hook.rb'
|
||||
- 'lib/gitlab/github_import/importer/releases_importer.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/RedundantAllowNil:
|
||||
Exclude:
|
||||
- 'app/models/application_setting.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: db/migrate/*.rb
|
||||
|
@ -284,8 +470,8 @@ Rails/ReversibleMigration:
|
|||
Exclude:
|
||||
- 'db/migrate/20160824103857_drop_unused_ci_tables.rb'
|
||||
|
||||
# Offense count: 446
|
||||
# Configuration parameters: Blacklist.
|
||||
# Offense count: 860
|
||||
# Configuration parameters: Blacklist, Whitelist.
|
||||
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
|
||||
Rails/SkipsModelValidations:
|
||||
Enabled: false
|
||||
|
@ -297,21 +483,24 @@ Rails/UnknownEnv:
|
|||
Exclude:
|
||||
- 'db/migrate/20171124125748_populate_missing_merge_request_statuses.rb'
|
||||
|
||||
# Offense count: 13
|
||||
# Offense count: 11
|
||||
# Cop supports --auto-correct.
|
||||
Security/YAMLLoad:
|
||||
Exclude:
|
||||
- 'config/initializers/carrierwave.rb'
|
||||
- 'lib/gitlab/background_migration/deserialize_merge_request_diffs_and_commits.rb'
|
||||
- 'lib/gitlab/redis/wrapper.rb'
|
||||
- 'lib/system_check/incoming_email/imap_authentication_check.rb'
|
||||
- 'spec/config/mail_room_spec.rb'
|
||||
- 'spec/initializers/secret_token_spec.rb'
|
||||
- 'spec/lib/gitlab/prometheus/additional_metrics_parser_spec.rb'
|
||||
- 'spec/models/clusters/platforms/kubernetes_spec.rb'
|
||||
- 'spec/models/project_services/kubernetes_service_spec.rb'
|
||||
|
||||
# Offense count: 64
|
||||
# Offense count: 34
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: inline, group
|
||||
Style/AccessModifierDeclarations:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 121
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: percent_q, bare_percent
|
||||
|
@ -324,17 +513,13 @@ Style/CommentedKeyword:
|
|||
- 'lib/tasks/gitlab/backup.rake'
|
||||
- 'spec/tasks/gitlab/backup_rake_spec.rb'
|
||||
|
||||
# Offense count: 30
|
||||
Style/DateTime:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/Dir:
|
||||
Exclude:
|
||||
- 'qa/qa.rb'
|
||||
|
||||
# Offense count: 9
|
||||
# Offense count: 7
|
||||
# Cop supports --auto-correct.
|
||||
Style/EachWithObject:
|
||||
Exclude:
|
||||
|
@ -345,101 +530,87 @@ Style/EachWithObject:
|
|||
- 'lib/gitlab/i18n/po_linter.rb'
|
||||
- 'lib/gitlab/import_export/members_mapper.rb'
|
||||
- 'lib/gitlab/import_export/relation_factory.rb'
|
||||
- 'scripts/static-analysis'
|
||||
|
||||
# Offense count: 24
|
||||
# Offense count: 34
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: empty, nil, both
|
||||
Style/EmptyElse:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 14
|
||||
# Offense count: 11
|
||||
# Cop supports --auto-correct.
|
||||
Style/EmptyLambdaParameter:
|
||||
Exclude:
|
||||
- 'app/models/ci/build.rb'
|
||||
- 'app/models/ci/runner.rb'
|
||||
|
||||
# Offense count: 12
|
||||
# Offense count: 9
|
||||
# Cop supports --auto-correct.
|
||||
Style/EmptyLiteral:
|
||||
Exclude:
|
||||
- 'features/steps/project/commits/commits.rb'
|
||||
- 'lib/gitlab/fogbugz_import/importer.rb'
|
||||
- 'lib/gitlab/git/diff_collection.rb'
|
||||
- 'lib/gitlab/gitaly_client.rb'
|
||||
- 'scripts/trigger-build'
|
||||
- 'spec/features/merge_requests/versions_spec.rb'
|
||||
- 'spec/helpers/merge_requests_helper_spec.rb'
|
||||
- 'spec/lib/gitlab/request_context_spec.rb'
|
||||
- 'spec/lib/gitlab/workhorse_spec.rb'
|
||||
- 'spec/requests/api/jobs_spec.rb'
|
||||
- 'spec/support/shared_examples/chat_slash_commands_shared_examples.rb'
|
||||
|
||||
# Offense count: 102
|
||||
# Offense count: 180
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: compact, expanded
|
||||
Style/EmptyMethod:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 23
|
||||
# Cop supports --auto-correct.
|
||||
Style/Encoding:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
Style/EvalWithLocation:
|
||||
Exclude:
|
||||
- 'app/models/service.rb'
|
||||
|
||||
# Offense count: 35
|
||||
# Offense count: 203
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: format, sprintf, percent
|
||||
Style/FormatString:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 384
|
||||
# Offense count: 669
|
||||
# Configuration parameters: MinBodyLength.
|
||||
Style/GuardClause:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 22
|
||||
# Offense count: 27
|
||||
Style/IfInsideElse:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 809
|
||||
# Offense count: 1346
|
||||
# Cop supports --auto-correct.
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 75
|
||||
# Offense count: 186
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: line_count_dependent, lambda, literal
|
||||
Style/Lambda:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 11
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
Style/LineEndConcatenation:
|
||||
Exclude:
|
||||
- 'app/helpers/tree_helper.rb'
|
||||
- 'spec/features/issuables/markdown_references_spec.rb'
|
||||
- 'spec/lib/gitlab/checks/project_moved_spec.rb'
|
||||
- 'spec/lib/gitlab/gfm/reference_rewriter_spec.rb'
|
||||
- 'spec/lib/gitlab/incoming_email_spec.rb'
|
||||
|
||||
# Offense count: 18
|
||||
Style/MethodMissing:
|
||||
Style/MethodMissingSuper:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 7
|
||||
# Offense count: 18
|
||||
Style/MissingRespondToMissing:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 6
|
||||
Style/MixinUsage:
|
||||
Exclude:
|
||||
- 'features/support/env.rb'
|
||||
- 'spec/factories/ci/builds.rb'
|
||||
- 'spec/factories/ci/job_artifacts.rb'
|
||||
- 'spec/factories/lfs_objects.rb'
|
||||
|
@ -447,59 +618,63 @@ Style/MixinUsage:
|
|||
- 'spec/lib/gitlab/import_export/project_tree_restorer_spec.rb'
|
||||
- 'spec/lib/gitlab/import_export/version_checker_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Offense count: 4
|
||||
# Cop supports --auto-correct.
|
||||
Style/MultilineIfModifier:
|
||||
Exclude:
|
||||
- 'app/helpers/snippets_helper.rb'
|
||||
- 'app/models/project_wiki.rb'
|
||||
- 'app/services/ci/process_pipeline_service.rb'
|
||||
- 'app/services/create_deployment_service.rb'
|
||||
- 'lib/api/commit_statuses.rb'
|
||||
- 'lib/gitlab/ci/trace.rb'
|
||||
|
||||
# Offense count: 25
|
||||
# Offense count: 72
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: literals, strict
|
||||
Style/MutableConstant:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 28
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Whitelist.
|
||||
# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
|
||||
Style/NestedParenthesizedCalls:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 19
|
||||
# Offense count: 31
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, MinBodyLength.
|
||||
# SupportedStyles: skip_modifier_ifs, always
|
||||
Style/Next:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 61
|
||||
# Offense count: 67
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedOctalStyle.
|
||||
# SupportedOctalStyles: zero_with_o, zero_only
|
||||
Style/NumericLiteralPrefix:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 114
|
||||
# Offense count: 186
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
||||
# SupportedStyles: predicate, comparison
|
||||
Style/NumericPredicate:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/OrAssignment:
|
||||
Exclude:
|
||||
- 'app/models/concerns/token_authenticatable.rb'
|
||||
- 'lib/api/commit_statuses.rb'
|
||||
- 'lib/gitlab/project_transfer.rb'
|
||||
|
||||
# Offense count: 50
|
||||
# Offense count: 79
|
||||
# Cop supports --auto-correct.
|
||||
Style/ParallelAssignment:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 917
|
||||
# Offense count: 1390
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: PreferredDelimiters.
|
||||
Style/PercentLiteralDelimiters:
|
||||
|
@ -521,25 +696,20 @@ Style/PerlBackrefs:
|
|||
- 'lib/gitlab/search_results.rb'
|
||||
- 'lib/gitlab/sherlock/query.rb'
|
||||
|
||||
# Offense count: 87
|
||||
# Offense count: 129
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: compact, exploded
|
||||
Style/RaiseArgs:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 9
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
Style/RedundantBegin:
|
||||
Exclude:
|
||||
- 'app/controllers/projects/clusters/gcp_controller.rb'
|
||||
- 'app/models/merge_request.rb'
|
||||
- 'app/services/projects/import_service.rb'
|
||||
- 'lib/api/branches.rb'
|
||||
- 'lib/gitlab/current_settings.rb'
|
||||
- 'lib/gitlab/git/commit.rb'
|
||||
- 'lib/gitlab/health_checks/base_abstract_check.rb'
|
||||
- 'lib/tasks/gitlab/task_helpers.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
|
@ -547,7 +717,7 @@ Style/RedundantConditional:
|
|||
Exclude:
|
||||
- 'lib/system_check/helpers.rb'
|
||||
|
||||
# Offense count: 57
|
||||
# Offense count: 360
|
||||
# Cop supports --auto-correct.
|
||||
Style/RedundantFreeze:
|
||||
Enabled: false
|
||||
|
@ -567,42 +737,36 @@ Style/RedundantReturn:
|
|||
- 'lib/gitlab/utils.rb'
|
||||
- 'lib/google_api/auth.rb'
|
||||
|
||||
# Offense count: 460
|
||||
# Offense count: 700
|
||||
# Cop supports --auto-correct.
|
||||
Style/RedundantSelf:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 142
|
||||
# Offense count: 28
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
||||
# SupportedStyles: slashes, percent_r, mixed
|
||||
Style/RegexpLiteral:
|
||||
Enabled: true
|
||||
EnforcedStyle: mixed
|
||||
AllowInnerSlashes: false
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 36
|
||||
# Offense count: 41
|
||||
# Cop supports --auto-correct.
|
||||
Style/RescueModifier:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 107
|
||||
# Offense count: 197
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: implicit, explicit
|
||||
Style/RescueStandardError:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 8
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
Style/SelfAssignment:
|
||||
Exclude:
|
||||
- 'app/models/concerns/bulk_member_access_load.rb'
|
||||
- 'app/serializers/base_serializer.rb'
|
||||
- 'app/services/notification_service.rb'
|
||||
- 'lib/api/runners.rb'
|
||||
- 'spec/features/merge_requests/diff_notes_resolve_spec.rb'
|
||||
- 'spec/features/projects/clusters/interchangeability_spec.rb'
|
||||
- 'spec/support/import_export/configuration_helper.rb'
|
||||
|
||||
# Offense count: 50
|
||||
|
@ -612,7 +776,7 @@ Style/SingleLineMethods:
|
|||
Exclude:
|
||||
- 'lib/gitlab/ci/ansi2html.rb'
|
||||
|
||||
# Offense count: 66
|
||||
# Offense count: 91
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: .
|
||||
# SupportedStyles: use_perl_names, use_english_names
|
||||
|
@ -625,21 +789,21 @@ Style/StderrPuts:
|
|||
Exclude:
|
||||
- 'config/initializers/rspec_profiling.rb'
|
||||
|
||||
# Offense count: 45
|
||||
# Offense count: 65
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: single_quotes, double_quotes
|
||||
Style/StringLiteralsInInterpolation:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 106
|
||||
# Offense count: 187
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
# IgnoredMethods: respond_to, define_method
|
||||
Style/SymbolProc:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 9
|
||||
# Offense count: 7
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, AllowSafeAssignment.
|
||||
# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
|
||||
|
@ -647,45 +811,65 @@ Style/TernaryParentheses:
|
|||
Exclude:
|
||||
- 'app/finders/projects_finder.rb'
|
||||
- 'app/helpers/namespaces_helper.rb'
|
||||
- 'features/support/capybara.rb'
|
||||
- 'lib/gitlab/ci/build/artifacts/metadata/entry.rb'
|
||||
- 'spec/requests/api/pipeline_schedules_spec.rb'
|
||||
- 'spec/support/capybara.rb'
|
||||
|
||||
# Offense count: 17
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowNamedUnderscoreVariables.
|
||||
Style/TrailingUnderscoreVariable:
|
||||
# Configuration parameters: EnforcedStyleForMultiline.
|
||||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
||||
Style/TrailingCommaInArguments:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/background_jobs_controller.rb'
|
||||
- 'app/controllers/invites_controller.rb'
|
||||
- 'app/helpers/tab_helper.rb'
|
||||
- 'lib/backup/manager.rb'
|
||||
- 'lib/gitlab/logger.rb'
|
||||
- 'lib/gitlab/upgrader.rb'
|
||||
- 'lib/system_check/app/migrations_are_up_check.rb'
|
||||
- 'lib/system_check/incoming_email/mail_room_running_check.rb'
|
||||
- 'lib/tasks/gitlab/check.rake'
|
||||
- 'lib/tasks/gitlab/task_helpers.rb'
|
||||
- 'spec/lib/gitlab/etag_caching/middleware_spec.rb'
|
||||
- 'spec/services/quick_actions/interpret_service_spec.rb'
|
||||
- 'spec/features/markdown/copy_as_gfm_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 10
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyleForMultiline.
|
||||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
Exclude:
|
||||
- 'ee/spec/models/project_spec.rb'
|
||||
- 'spec/lib/gitlab/diff/position_tracer_spec.rb'
|
||||
- 'spec/lib/gitlab/metrics/dashboard/processor_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyleForMultiline.
|
||||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
||||
Style/TrailingCommaInHashLiteral:
|
||||
Exclude:
|
||||
- 'lib/gitlab/ci/ansi2html.rb'
|
||||
- 'lib/gitlab/kubernetes.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/UnlessElse:
|
||||
Exclude:
|
||||
- 'lib/backup/manager.rb'
|
||||
- 'lib/gitlab/project_search_results.rb'
|
||||
- 'lib/tasks/gitlab/check.rake'
|
||||
- 'spec/features/issues/award_emoji_spec.rb'
|
||||
|
||||
# Offense count: 31
|
||||
# Offense count: 10
|
||||
# Cop supports --auto-correct.
|
||||
Style/UnneededCondition:
|
||||
Exclude:
|
||||
- 'app/helpers/button_helper.rb'
|
||||
- 'app/helpers/environment_helper.rb'
|
||||
- 'app/models/project.rb'
|
||||
- 'app/services/issuable/clone/base_service.rb'
|
||||
- 'app/services/prometheus/adapter_service.rb'
|
||||
- 'lib/gitlab/email/message/repository_push.rb'
|
||||
- 'lib/gitlab/prometheus_client.rb'
|
||||
- 'spec/lib/rspec_flaky/flaky_example_spec.rb'
|
||||
|
||||
# Offense count: 73
|
||||
# Cop supports --auto-correct.
|
||||
Style/UnneededInterpolation:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 22840
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 1310
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/UnneededSort:
|
||||
Exclude:
|
||||
- 'app/models/concerns/resolvable_discussion.rb'
|
||||
- 'lib/gitlab/highlight.rb'
|
||||
|
|
|
@ -1 +1 @@
|
|||
2.5.3
|
||||
2.6.3
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# Linter Documentation:
|
||||
# https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md
|
||||
|
||||
scss_files: 'app/assets/stylesheets/**/*.scss'
|
||||
scss_files:
|
||||
- 'app/assets/stylesheets/**/*.scss'
|
||||
- 'ee/app/assets/stylesheets/**/*.scss'
|
||||
|
||||
exclude:
|
||||
- 'app/assets/stylesheets/pages/emojis.scss'
|
||||
|
|
111
.stylelintrc
Normal file
111
.stylelintrc
Normal file
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
"plugins":[
|
||||
"./scripts/frontend/stylelint/stylelint-duplicate-selectors.js",
|
||||
"./scripts/frontend/stylelint/stylelint-utility-classes.js",
|
||||
"stylelint-scss"
|
||||
],
|
||||
"rules":{
|
||||
"at-rule-blacklist":[
|
||||
"debug"
|
||||
],
|
||||
"at-rule-no-unknown":null,
|
||||
"at-rule-no-vendor-prefix":true,
|
||||
"block-no-empty":true,
|
||||
"block-opening-brace-space-before":"always",
|
||||
"color-hex-case":"lower",
|
||||
"color-hex-length":"short",
|
||||
"color-named":"never",
|
||||
"color-no-invalid-hex":true,
|
||||
"declaration-bang-space-after":"never",
|
||||
"declaration-bang-space-before":"always",
|
||||
"declaration-block-semicolon-newline-after":"always",
|
||||
"declaration-block-semicolon-space-before":"never",
|
||||
"declaration-block-single-line-max-declarations":1,
|
||||
"declaration-block-trailing-semicolon":"always",
|
||||
"declaration-colon-space-after":"always-single-line",
|
||||
"declaration-colon-space-before":"never",
|
||||
"declaration-property-value-blacklist":{
|
||||
"border":[
|
||||
"none"
|
||||
],
|
||||
"border-top":[
|
||||
"none"
|
||||
],
|
||||
"border-right":[
|
||||
"none"
|
||||
],
|
||||
"border-bottom":[
|
||||
"none"
|
||||
],
|
||||
"border-left":[
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"function-comma-space-after":"always-single-line",
|
||||
"function-parentheses-space-inside":"never",
|
||||
"function-url-quotes":"always",
|
||||
"indentation":2,
|
||||
"length-zero-no-unit":true,
|
||||
"max-nesting-depth":[
|
||||
3,
|
||||
{
|
||||
"ignoreAtRules":[
|
||||
"each",
|
||||
"media",
|
||||
"supports",
|
||||
"include"
|
||||
],
|
||||
"severity":"warning"
|
||||
}
|
||||
],
|
||||
"media-feature-name-no-vendor-prefix":true,
|
||||
"media-feature-parentheses-space-inside":"never",
|
||||
"no-missing-end-of-source-newline":true,
|
||||
"number-leading-zero":"always",
|
||||
"number-no-trailing-zeros":true,
|
||||
"property-no-unknown":true,
|
||||
"property-no-vendor-prefix": [true, { "ignoreProperties": ["user-select"] }],
|
||||
"rule-empty-line-before":[
|
||||
"always-multi-line",
|
||||
{
|
||||
"except":[
|
||||
"first-nested"
|
||||
],
|
||||
"ignore":[
|
||||
"after-comment"
|
||||
]
|
||||
}
|
||||
],
|
||||
"scss/at-extend-no-missing-placeholder":[true,{ "severity": "warning" }],
|
||||
"scss/at-function-pattern":"^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
|
||||
"scss/at-import-no-partial-leading-underscore":true,
|
||||
"scss/at-import-partial-extension-blacklist":[
|
||||
"scss"
|
||||
],
|
||||
"scss/at-mixin-pattern":"^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
|
||||
"scss/at-rule-no-unknown":true,
|
||||
"scss/dollar-variable-colon-space-after":"always",
|
||||
"scss/dollar-variable-colon-space-before":"never",
|
||||
"scss/dollar-variable-pattern":"^[_]?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
|
||||
"scss/percent-placeholder-pattern":"^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
|
||||
"scss/selector-no-redundant-nesting-selector":true,
|
||||
"selector-class-pattern":[
|
||||
"^[a-z0-9\\-]+$",
|
||||
{
|
||||
"message":"Selector should be written in lowercase with hyphens (selector-class-pattern)",
|
||||
"severity": "warning"
|
||||
}
|
||||
],
|
||||
"selector-list-comma-newline-after":"always",
|
||||
"selector-max-compound-selectors":[3, { "severity": "warning" }],
|
||||
"selector-max-id":1,
|
||||
"selector-no-vendor-prefix":true,
|
||||
"selector-pseudo-element-colon-notation":"double",
|
||||
"selector-pseudo-element-no-unknown":true,
|
||||
"shorthand-property-no-redundant-values":true,
|
||||
"string-quotes":"single",
|
||||
"value-no-vendor-prefix":[true, { "ignoreValues": ["sticky"] }],
|
||||
"stylelint-gitlab/duplicate-selectors":[true,{ "severity": "warning" }],
|
||||
"stylelint-gitlab/utility-classes":[true,{ "severity": "warning" }]
|
||||
}
|
||||
}
|
7
.yamllint
Normal file
7
.yamllint
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
line-length: disable
|
||||
document-start: disable
|
5
16790-render-xml-artifacts.yml
Normal file
5
16790-render-xml-artifacts.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Render xml artifact files in GitLab
|
||||
merge_request: 16790
|
||||
author:
|
||||
type: added
|
5332
CHANGELOG-EE.md
Normal file
5332
CHANGELOG-EE.md
Normal file
File diff suppressed because it is too large
Load diff
2580
CHANGELOG.md
2580
CHANGELOG.md
File diff suppressed because it is too large
Load diff
|
@ -1,13 +1,9 @@
|
|||
## Developer Certificate of Origin + License
|
||||
## Contributor license agreement
|
||||
|
||||
By contributing to GitLab B.V., You accept and agree to the following terms and
|
||||
conditions for Your present and future Contributions submitted to GitLab B.V.
|
||||
Except for the license granted herein to GitLab B.V. and recipients of software
|
||||
distributed by GitLab B.V., You reserve all right, title, and interest in and to
|
||||
Your Contributions. All Contributions are subject to the following DCO + License
|
||||
terms.
|
||||
|
||||
[DCO + License](https://gitlab.com/gitlab-org/dco/blob/master/README.md)
|
||||
By submitting code as an individual you agree to the
|
||||
[individual contributor license agreement](doc/legal/individual_contributor_license_agreement.md).
|
||||
By submitting code as an entity you agree to the
|
||||
[corporate contributor license agreement](doc/legal/corporate_contributor_license_agreement.md).
|
||||
|
||||
All Documentation content that resides under the [doc/ directory](/doc) of this
|
||||
repository is licensed under Creative Commons:
|
||||
|
@ -18,11 +14,11 @@ _This notice should stay as the first item in the CONTRIBUTING.md file._
|
|||
## Contributing Documentation has been moved
|
||||
|
||||
As of July 2018, all the documentation for contributing to the GitLab project has been moved to a new location.
|
||||
[view the new documentation](doc/development/contributing/index.md) to find the latest information.
|
||||
[View the new documentation](https://about.gitlab.com/community/contribute/) to find the latest information.
|
||||
|
||||
## Contribute to GitLab
|
||||
|
||||
This [documentation](doc/development/contributing/index.md#contribute-to-gitlab) has been moved.
|
||||
[View the new documentation](https://about.gitlab.com/community/contribute/) to find the latest information.
|
||||
|
||||
## Security vulnerability disclosure
|
||||
|
||||
|
@ -42,7 +38,7 @@ This [documentation](doc/development/contributing/index.md#helping-others) has b
|
|||
|
||||
## I want to contribute!
|
||||
|
||||
This [documentation](doc/development/contributing/index.md#i-want-to-contribute) has been moved.
|
||||
[View the new documentation](https://about.gitlab.com/community/contribute/) to find the latest information.
|
||||
|
||||
## Contribution Flow
|
||||
|
||||
|
|
23
Dangerfile
23
Dangerfile
|
@ -1,13 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'lib/gitlab_danger'
|
||||
|
||||
danger.import_plugin('danger/plugins/helper.rb')
|
||||
danger.import_dangerfile(path: 'danger/metadata')
|
||||
danger.import_dangerfile(path: 'danger/changes_size')
|
||||
danger.import_dangerfile(path: 'danger/changelog')
|
||||
danger.import_dangerfile(path: 'danger/specs')
|
||||
danger.import_dangerfile(path: 'danger/gemfile')
|
||||
danger.import_dangerfile(path: 'danger/database')
|
||||
danger.import_dangerfile(path: 'danger/documentation')
|
||||
danger.import_dangerfile(path: 'danger/frozen_string')
|
||||
danger.import_dangerfile(path: 'danger/commit_messages')
|
||||
danger.import_dangerfile(path: 'danger/duplicate_yarn_dependencies')
|
||||
danger.import_dangerfile(path: 'danger/prettier')
|
||||
danger.import_dangerfile(path: 'danger/eslint')
|
||||
danger.import_plugin('danger/plugins/roulette.rb')
|
||||
|
||||
unless helper.release_automation?
|
||||
GitlabDanger.new(helper.gitlab_helper).rule_names.each do |file|
|
||||
danger.import_dangerfile(path: File.join('danger', file))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.20.1
|
||||
1.65.2
|
||||
|
|
1
GITLAB_ELASTICSEARCH_INDEXER_VERSION
Normal file
1
GITLAB_ELASTICSEARCH_INDEXER_VERSION
Normal file
|
@ -0,0 +1 @@
|
|||
1.3.0
|
|
@ -1 +1 @@
|
|||
1.5.0
|
||||
1.9.0
|
||||
|
|
|
@ -1 +1 @@
|
|||
8.4.4
|
||||
10.0.0
|
||||
|
|
|
@ -1 +1 @@
|
|||
8.3.3
|
||||
8.10.1
|
||||
|
|
204
Gemfile
204
Gemfile
|
@ -1,7 +1,8 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '5.0.7.2'
|
||||
gem 'rails-deprecated_sanitizer', '~> 1.0.3'
|
||||
gem 'rails', '5.2.3'
|
||||
|
||||
gem 'bootsnap', '~> 1.4'
|
||||
|
||||
# Improves copy-on-write performance for MRI
|
||||
gem 'nakayoshi_fork', '~> 0.0.4'
|
||||
|
@ -12,19 +13,18 @@ gem 'responders', '~> 2.0'
|
|||
gem 'sprockets', '~> 3.7.0'
|
||||
|
||||
# Default values for AR models
|
||||
gem 'gitlab-default_value_for', '~> 3.1.1', require: 'default_value_for'
|
||||
gem 'default_value_for', '~> 3.2.0'
|
||||
|
||||
# Supported DBs
|
||||
gem 'mysql2', '~> 0.4.10', group: :mysql
|
||||
gem 'pg', '~> 1.1', group: :postgres
|
||||
gem 'pg', '~> 1.1'
|
||||
|
||||
gem 'rugged', '~> 0.27'
|
||||
gem 'grape-path-helpers', '~> 1.0'
|
||||
gem 'rugged', '~> 0.28'
|
||||
gem 'grape-path-helpers', '~> 1.1'
|
||||
|
||||
gem 'faraday', '~> 0.12'
|
||||
|
||||
# Authentication libraries
|
||||
gem 'devise', '~> 4.4'
|
||||
gem 'devise', '~> 4.6'
|
||||
gem 'doorkeeper', '~> 4.3'
|
||||
gem 'doorkeeper-openid_connect', '~> 1.5'
|
||||
gem 'omniauth', '~> 1.8'
|
||||
|
@ -42,12 +42,19 @@ gem 'omniauth-shibboleth', '~> 1.3.0'
|
|||
gem 'omniauth-twitter', '~> 1.4'
|
||||
gem 'omniauth_crowd', '~> 2.2.0'
|
||||
gem 'omniauth-authentiq', '~> 0.3.3'
|
||||
gem 'rack-oauth2', '~> 1.2.1'
|
||||
gem 'omniauth_openid_connect', '~> 0.3.1'
|
||||
gem "omniauth-ultraauth", '~> 0.0.2'
|
||||
gem 'omniauth-salesforce', '~> 1.0.5'
|
||||
gem 'rack-oauth2', '~> 1.9.3'
|
||||
gem 'jwt', '~> 2.1.0'
|
||||
|
||||
# Kerberos authentication. EE-only
|
||||
gem 'gssapi', group: :kerberos
|
||||
|
||||
# Spam and anti-bot protection
|
||||
gem 'recaptcha', '~> 3.0', require: 'recaptcha/rails'
|
||||
gem 'recaptcha', '~> 4.11', require: 'recaptcha/rails'
|
||||
gem 'akismet', '~> 2.0'
|
||||
gem 'invisible_captcha', '~> 0.12.1'
|
||||
|
||||
# Two-factor authentication
|
||||
gem 'devise-two-factor', '~> 3.0.0'
|
||||
|
@ -58,6 +65,8 @@ gem 'u2f', '~> 0.2.1'
|
|||
# GitLab Pages
|
||||
gem 'validates_hostname', '~> 1.0.6'
|
||||
gem 'rubyzip', '~> 1.2.2', require: 'zip'
|
||||
# GitLab Pages letsencrypt support
|
||||
gem 'acme-client', '~> 2.0.2'
|
||||
|
||||
# Browser detection
|
||||
gem 'browser', '~> 2.5'
|
||||
|
@ -68,7 +77,7 @@ gem 'gpgme', '~> 2.0.18'
|
|||
# LDAP Auth
|
||||
# GitLab fork with several improvements to original library. For full list of changes
|
||||
# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
|
||||
gem 'gitlab_omniauth-ldap', '~> 2.0.4', require: 'omniauth-ldap'
|
||||
gem 'gitlab_omniauth-ldap', '~> 2.1.1', require: 'omniauth-ldap'
|
||||
gem 'net-ldap'
|
||||
|
||||
# API
|
||||
|
@ -77,8 +86,13 @@ gem 'grape-entity', '~> 0.7.1'
|
|||
gem 'rack-cors', '~> 1.0.0', require: 'rack/cors'
|
||||
|
||||
# GraphQL API
|
||||
gem 'graphql', '~> 1.8.0'
|
||||
gem 'graphql', '~> 1.9.11'
|
||||
# NOTE: graphiql-rails v1.5+ doesn't work: https://gitlab.com/gitlab-org/gitlab-ce/issues/67293
|
||||
# TODO: remove app/views/graphiql/rails/editors/show.html.erb when https://github.com/rmosolgo/graphiql-rails/pull/71 is released:
|
||||
# https://gitlab.com/gitlab-org/gitlab-ce/issues/67263
|
||||
gem 'graphiql-rails', '~> 1.4.10'
|
||||
gem 'apollo_upload_server', '~> 2.0.0.beta3'
|
||||
gem 'graphql-docs', '~> 1.6.0', group: [:development, :test]
|
||||
|
||||
# Disable strong_params so that Mash does not respond to :permitted?
|
||||
gem 'hashie-forbidden_attributes'
|
||||
|
@ -94,13 +108,15 @@ gem 'carrierwave', '~> 1.3'
|
|||
gem 'mini_magick'
|
||||
|
||||
# for backups
|
||||
gem 'fog-aws', '~> 2.0.1'
|
||||
gem 'fog-core', '~> 1.44'
|
||||
gem 'fog-google', '~> 1.7.1'
|
||||
gem 'fog-local', '~> 0.3'
|
||||
gem 'fog-openstack', '~> 0.1'
|
||||
gem 'fog-aws', '~> 3.5'
|
||||
# Locked until fog-google resolves https://github.com/fog/fog-google/issues/421.
|
||||
# Also see config/initializers/fog_core_patch.rb.
|
||||
gem 'fog-core', '= 2.1.0'
|
||||
gem 'fog-google', '~> 1.9'
|
||||
gem 'fog-local', '~> 0.6'
|
||||
gem 'fog-openstack', '~> 1.0'
|
||||
gem 'fog-rackspace', '~> 0.1.1'
|
||||
gem 'fog-aliyun', '~> 0.2.0'
|
||||
gem 'fog-aliyun', '~> 0.3'
|
||||
|
||||
# for Google storage
|
||||
gem 'google-api-client', '~> 0.23'
|
||||
|
@ -111,10 +127,17 @@ gem 'unf', '~> 0.1.4'
|
|||
# Seed data
|
||||
gem 'seed-fu', '~> 2.3.7'
|
||||
|
||||
# Search
|
||||
gem 'elasticsearch-model', '~> 0.1.9'
|
||||
gem 'elasticsearch-rails', '~> 0.1.9', require: 'elasticsearch/rails/instrumentation'
|
||||
gem 'elasticsearch-api', '5.0.3'
|
||||
gem 'aws-sdk'
|
||||
gem 'faraday_middleware-aws-signers-v4'
|
||||
|
||||
# Markdown and HTML processing
|
||||
gem 'html-pipeline', '~> 2.8'
|
||||
gem 'deckar01-task_list', '2.2.0'
|
||||
gem 'gitlab-markup', '~> 1.6.5'
|
||||
gem 'gitlab-markup', '~> 1.7.0'
|
||||
gem 'github-markup', '~> 1.7.0', require: 'github/markup'
|
||||
gem 'commonmarker', '~> 0.17'
|
||||
gem 'RedCloth', '~> 4.3.2'
|
||||
|
@ -122,12 +145,13 @@ gem 'rdoc', '~> 6.0'
|
|||
gem 'org-ruby', '~> 0.9.12'
|
||||
gem 'creole', '~> 0.5.0'
|
||||
gem 'wikicloth', '0.8.1'
|
||||
gem 'asciidoctor', '~> 1.5.8'
|
||||
gem 'asciidoctor-plantuml', '0.0.8'
|
||||
gem 'rouge', '~> 3.1'
|
||||
gem 'asciidoctor', '~> 2.0.10'
|
||||
gem 'asciidoctor-include-ext', '~> 0.3.1', require: false
|
||||
gem 'asciidoctor-plantuml', '0.0.9'
|
||||
gem 'rouge', '~> 3.7'
|
||||
gem 'truncato', '~> 0.7.11'
|
||||
gem 'bootstrap_form', '~> 2.7.0'
|
||||
gem 'nokogiri', '~> 1.10.1'
|
||||
gem 'bootstrap_form', '~> 4.2.0'
|
||||
gem 'nokogiri', '~> 1.10.4'
|
||||
gem 'escape_utils', '~> 1.1'
|
||||
|
||||
# Calendar rendering
|
||||
|
@ -137,38 +161,36 @@ gem 'icalendar'
|
|||
gem 'diffy', '~> 3.1.0'
|
||||
|
||||
# Application server
|
||||
# The 2.0.6 version of rack requires monkeypatch to be present in
|
||||
# `config.ru`. This can be removed once a new update for Rack
|
||||
# is available that contains https://github.com/rack/rack/pull/1201.
|
||||
gem 'rack', '2.0.6'
|
||||
gem 'rack', '~> 2.0.7'
|
||||
|
||||
group :unicorn do
|
||||
gem 'unicorn', '~> 5.1.0'
|
||||
gem 'unicorn', '~> 5.4.1'
|
||||
gem 'unicorn-worker-killer', '~> 0.4.4'
|
||||
end
|
||||
|
||||
group :puma do
|
||||
gem 'puma', '~> 3.12', require: false
|
||||
gem 'puma_worker_killer', require: false
|
||||
gem 'rack-timeout', require: false
|
||||
end
|
||||
|
||||
# State machine
|
||||
gem 'state_machines-activerecord', '~> 0.5.1'
|
||||
|
||||
# Issue tags
|
||||
gem 'acts-as-taggable-on', '~> 5.0'
|
||||
gem 'acts-as-taggable-on', '~> 6.0'
|
||||
|
||||
# Background jobs
|
||||
gem 'sidekiq', '~> 5.2.1'
|
||||
gem 'sidekiq', '~> 5.2.7'
|
||||
gem 'sidekiq-cron', '~> 1.0'
|
||||
gem 'redis-namespace', '~> 1.6.0'
|
||||
gem 'gitlab-sidekiq-fetcher', '~> 0.4.0', require: 'sidekiq-reliable-fetch'
|
||||
gem 'gitlab-sidekiq-fetcher', '0.5.2', require: 'sidekiq-reliable-fetch'
|
||||
|
||||
# Cron Parser
|
||||
gem 'fugit', '~> 1.1'
|
||||
gem 'fugit', '~> 1.2.1'
|
||||
|
||||
# HTTP requests
|
||||
gem 'httparty', '~> 0.13.3'
|
||||
gem 'httparty', '~> 0.16.4'
|
||||
|
||||
# Colored output to console
|
||||
gem 'rainbow', '~> 3.0'
|
||||
|
@ -184,7 +206,7 @@ gem 're2', '~> 1.1.1'
|
|||
|
||||
# Misc
|
||||
|
||||
gem 'version_sorter', '~> 2.1.0'
|
||||
gem 'version_sorter', '~> 2.2.4'
|
||||
|
||||
# Export Ruby Regex to Javascript
|
||||
gem 'js_regex', '~> 3.1'
|
||||
|
@ -192,21 +214,22 @@ gem 'js_regex', '~> 3.1'
|
|||
# User agent parsing
|
||||
gem 'device_detector'
|
||||
|
||||
# Cache
|
||||
gem 'redis-rails', '~> 5.0.2'
|
||||
|
||||
# Redis
|
||||
gem 'redis', '~> 3.2'
|
||||
gem 'redis', '~> 4.0'
|
||||
gem 'connection_pool', '~> 2.0'
|
||||
|
||||
# Redis session store
|
||||
gem 'redis-rails', '~> 5.0.2'
|
||||
|
||||
# Discord integration
|
||||
gem 'discordrb-webhooks-blackst0ne', '~> 3.3', require: false
|
||||
|
||||
# HipChat integration
|
||||
gem 'hipchat', '~> 1.5.0'
|
||||
|
||||
# JIRA integration
|
||||
gem 'jira-ruby', '~> 1.4'
|
||||
# Jira integration
|
||||
gem 'jira-ruby', '~> 1.7'
|
||||
gem 'atlassian-jwt', '~> 0.2.0'
|
||||
|
||||
# Flowdock integration
|
||||
gem 'flowdock', '~> 0.7'
|
||||
|
@ -224,7 +247,7 @@ gem 'asana', '~> 0.8.1'
|
|||
gem 'ruby-fogbugz', '~> 0.2.1'
|
||||
|
||||
# Kubernetes integration
|
||||
gem 'kubeclient', '~> 4.2.2'
|
||||
gem 'kubeclient', '~> 4.4.0'
|
||||
|
||||
# Sanitize user input
|
||||
gem 'sanitize', '~> 4.6'
|
||||
|
@ -253,30 +276,31 @@ gem 'fast_blank'
|
|||
|
||||
# Parse time & duration
|
||||
gem 'chronic', '~> 0.10.2'
|
||||
gem 'chronic_duration', '~> 0.10.6'
|
||||
gem 'gitlab_chronic_duration', '~> 0.10.6.1'
|
||||
|
||||
gem 'webpack-rails', '~> 0.9.10'
|
||||
gem 'rack-proxy', '~> 0.6.0'
|
||||
|
||||
gem 'sass-rails', '~> 5.0.6'
|
||||
gem 'sass', '~> 3.5'
|
||||
gem 'sassc-rails', '~> 2.1.0'
|
||||
gem 'uglifier', '~> 2.7.2'
|
||||
|
||||
gem 'addressable', '~> 2.5.2'
|
||||
gem 'font-awesome-rails', '~> 4.7'
|
||||
gem 'gemojione', '~> 3.3'
|
||||
gem 'gon', '~> 6.2'
|
||||
gem 'jquery-atwho-rails', '~> 1.3.2'
|
||||
gem 'request_store', '~> 1.3'
|
||||
gem 'select2-rails', '~> 3.5.9'
|
||||
gem 'virtus', '~> 1.0.1'
|
||||
gem 'base32', '~> 0.3.0'
|
||||
|
||||
gem "gitlab-license", "~> 1.0"
|
||||
|
||||
# Sentry integration
|
||||
gem 'sentry-raven', '~> 2.7'
|
||||
gem 'sentry-raven', '~> 2.9'
|
||||
|
||||
gem 'premailer-rails', '~> 1.9.7'
|
||||
|
||||
# LabKit: Tracing and Correlation
|
||||
gem 'gitlab-labkit', '~> 0.5'
|
||||
|
||||
# I18n
|
||||
gem 'ruby_parser', '~> 3.8', require: false
|
||||
gem 'rails-i18n', '~> 5.1'
|
||||
|
@ -284,15 +308,17 @@ gem 'gettext_i18n_rails', '~> 1.8.0'
|
|||
gem 'gettext_i18n_rails_js', '~> 1.3'
|
||||
gem 'gettext', '~> 3.2.2', require: false, group: :development
|
||||
|
||||
gem 'batch-loader', '~> 1.2.2'
|
||||
gem 'batch-loader', '~> 1.4.0'
|
||||
|
||||
# Perf bar
|
||||
gem 'peek', '~> 1.0.1'
|
||||
gem 'peek-gc', '~> 0.0.2'
|
||||
gem 'peek-mysql2', '~> 1.2.0', group: :mysql
|
||||
gem 'peek-pg', '~> 1.3.0', group: :postgres
|
||||
gem 'peek-rblineprof', '~> 0.2.0'
|
||||
gem 'peek-redis', '~> 1.2.0'
|
||||
# https://gitlab.com/gitlab-org/gitlab-ee/issues/13996
|
||||
gem 'gitlab-peek', '~> 0.0.1', require: 'peek'
|
||||
|
||||
# Snowplow events tracking
|
||||
gem 'snowplow-tracker', '~> 0.6.1'
|
||||
|
||||
# Memory benchmarks
|
||||
gem 'derailed_benchmarks', require: false
|
||||
|
||||
# Metrics
|
||||
group :metrics do
|
||||
|
@ -300,21 +326,16 @@ group :metrics do
|
|||
gem 'influxdb', '~> 0.2', require: false
|
||||
|
||||
# Prometheus
|
||||
gem 'prometheus-client-mmap', '~> 0.9.4'
|
||||
gem 'prometheus-client-mmap', '~> 0.9.10'
|
||||
gem 'raindrops', '~> 0.18'
|
||||
end
|
||||
|
||||
group :tracing do
|
||||
# OpenTracing
|
||||
gem 'opentracing', '~> 0.4.3'
|
||||
gem 'jaeger-client', '~> 0.10.0'
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'foreman', '~> 0.84.0'
|
||||
gem 'brakeman', '~> 4.2', require: false
|
||||
gem 'danger', '~> 6.0', require: false
|
||||
|
||||
gem 'letter_opener_web', '~> 1.3.0'
|
||||
gem 'letter_opener_web', '~> 1.3.4'
|
||||
gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false
|
||||
|
||||
# Better errors handler
|
||||
|
@ -326,7 +347,6 @@ group :development do
|
|||
end
|
||||
|
||||
group :development, :test do
|
||||
gem 'bootsnap', '~> 1.3'
|
||||
gem 'bullet', '~> 5.5.0', require: !!ENV['ENABLE_BULLET']
|
||||
gem 'pry-byebug', '~> 3.5.1', platform: :mri
|
||||
gem 'pry-rails', '~> 0.3.4'
|
||||
|
@ -336,8 +356,8 @@ group :development, :test do
|
|||
|
||||
gem 'database_cleaner', '~> 1.7.0'
|
||||
gem 'factory_bot_rails', '~> 4.8.2'
|
||||
gem 'rspec-rails', '~> 3.7.0'
|
||||
gem 'rspec-retry', '~> 0.4.5'
|
||||
gem 'rspec-rails', '~> 3.8.0'
|
||||
gem 'rspec-retry', '~> 0.6.1'
|
||||
gem 'rspec_profiling', '~> 0.0.5'
|
||||
gem 'rspec-set', '~> 0.1.3'
|
||||
gem 'rspec-parameterized', require: false
|
||||
|
@ -348,21 +368,22 @@ group :development, :test do
|
|||
# Generate Fake data
|
||||
gem 'ffaker', '~> 2.10'
|
||||
|
||||
gem 'capybara', '~> 2.16.1'
|
||||
gem 'capybara-screenshot', '~> 1.0.18'
|
||||
gem 'selenium-webdriver', '~> 3.12'
|
||||
gem 'capybara', '~> 3.22.0'
|
||||
gem 'capybara-screenshot', '~> 1.0.22'
|
||||
gem 'selenium-webdriver', '~> 3.141'
|
||||
|
||||
gem 'spring', '~> 2.0.0'
|
||||
gem 'spring-commands-rspec', '~> 1.0.4'
|
||||
|
||||
gem 'gitlab-styles', '~> 2.4', require: false
|
||||
gem 'gitlab-styles', '~> 2.7', require: false
|
||||
# Pin these dependencies, otherwise a new rule could break the CI pipelines
|
||||
gem 'rubocop', '~> 0.54.0'
|
||||
gem 'rubocop', '~> 0.69.0'
|
||||
gem 'rubocop-performance', '~> 1.1.0'
|
||||
gem 'rubocop-rspec', '~> 1.22.1'
|
||||
|
||||
gem 'scss_lint', '~> 0.56.0', require: false
|
||||
gem 'haml_lint', '~> 0.28.0', require: false
|
||||
gem 'simplecov', '~> 0.14.0', require: false
|
||||
gem 'haml_lint', '~> 0.31.0', require: false
|
||||
gem 'simplecov', '~> 0.16.1', require: false
|
||||
gem 'bundler-audit', '~> 0.5.0', require: false
|
||||
|
||||
gem 'benchmark-ips', '~> 2.3.0', require: false
|
||||
|
@ -370,8 +391,6 @@ group :development, :test do
|
|||
gem 'license_finder', '~> 5.4', require: false
|
||||
gem 'knapsack', '~> 1.17'
|
||||
|
||||
gem 'activerecord_sane_schema_dumper', '1.0'
|
||||
|
||||
gem 'stackprof', '~> 0.2.10', require: false
|
||||
|
||||
gem 'simple_po_parser', '~> 1.1.2', require: false
|
||||
|
@ -380,12 +399,11 @@ group :development, :test do
|
|||
end
|
||||
|
||||
group :test do
|
||||
gem 'shoulda-matchers', '~> 3.1.2', require: false
|
||||
gem 'shoulda-matchers', '~> 4.0.1', require: false
|
||||
gem 'email_spec', '~> 2.2.0'
|
||||
gem 'json-schema', '~> 2.8.0'
|
||||
gem 'webmock', '~> 2.3.2'
|
||||
gem 'webmock', '~> 3.5.1'
|
||||
gem 'rails-controller-testing'
|
||||
gem 'sham_rack', '~> 1.3.6'
|
||||
gem 'concurrent-ruby', '~> 1.1'
|
||||
gem 'test-prof', '~> 0.2.5'
|
||||
gem 'rspec_junit_formatter'
|
||||
|
@ -398,8 +416,11 @@ gem 'mail_room', '~> 0.9.1'
|
|||
gem 'email_reply_trimmer', '~> 0.1'
|
||||
gem 'html2text'
|
||||
|
||||
gem 'ruby-prof', '~> 0.17.0'
|
||||
gem 'ruby-prof', '~> 1.0.0'
|
||||
gem 'rbtrace', '~> 0.4', require: false
|
||||
gem 'memory_profiler', '~> 0.9', require: false
|
||||
gem 'benchmark-memory', '~> 0.1', require: false
|
||||
gem 'activerecord-explain-analyze', '~> 0.1', require: false
|
||||
|
||||
# OAuth
|
||||
gem 'oauth2', '~> 1.4'
|
||||
|
@ -411,9 +432,12 @@ gem 'health_check', '~> 2.6.0'
|
|||
gem 'vmstat', '~> 2.3.0'
|
||||
gem 'sys-filesystem', '~> 1.1.6'
|
||||
|
||||
# NTP client
|
||||
gem 'net-ntp'
|
||||
|
||||
# SSH host key support
|
||||
gem 'net-ssh', '~> 5.0'
|
||||
gem 'sshkey', '~> 1.9.0'
|
||||
gem 'net-ssh', '~> 5.2'
|
||||
gem 'sshkey', '~> 2.0'
|
||||
|
||||
# Required for ED25519 SSH host key support
|
||||
group :ed25519 do
|
||||
|
@ -421,11 +445,12 @@ group :ed25519 do
|
|||
gem 'bcrypt_pbkdf', '~> 1.0'
|
||||
end
|
||||
|
||||
# Gitaly GRPC client
|
||||
gem 'gitaly-proto', '~> 1.10.0', require: 'gitaly'
|
||||
gem 'grpc', '~> 1.15.0'
|
||||
# Gitaly GRPC protocol definitions
|
||||
gem 'gitaly', '~> 1.58.0'
|
||||
|
||||
gem 'google-protobuf', '~> 3.6'
|
||||
gem 'grpc', '~> 1.19.0'
|
||||
|
||||
gem 'google-protobuf', '~> 3.7.1'
|
||||
|
||||
gem 'toml-rb', '~> 1.0.0', require: false
|
||||
|
||||
|
@ -433,7 +458,14 @@ gem 'toml-rb', '~> 1.0.0', require: false
|
|||
gem 'flipper', '~> 0.13.0'
|
||||
gem 'flipper-active_record', '~> 0.13.0'
|
||||
gem 'flipper-active_support_cache_store', '~> 0.13.0'
|
||||
gem 'unleash', '~> 0.1.5'
|
||||
|
||||
# Structured logging
|
||||
gem 'lograge', '~> 0.5'
|
||||
gem 'grape_logging', '~> 1.7'
|
||||
|
||||
# DNS Lookup
|
||||
gem 'net-dns', '~> 0.9.0'
|
||||
|
||||
# Countries list
|
||||
gem 'countries', '~> 3.0'
|
||||
|
|
751
Gemfile.lock
751
Gemfile.lock
File diff suppressed because it is too large
Load diff
10
LICENSE
10
LICENSE
|
@ -1,4 +1,12 @@
|
|||
Copyright GitLab B.V.
|
||||
Copyright (c) 2011-present GitLab B.V.
|
||||
|
||||
Portions of this software are licensed as follows:
|
||||
|
||||
* All content residing under the "doc/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license".
|
||||
* All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE".
|
||||
* All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license.
|
||||
* All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component.
|
||||
* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
This document is intended to communicate the product philosophy GitLab uses in creating GitLab Community Edition. The principles can be found in the [Product Section of the GitLab Handbook](https://about.gitlab.com/handbook/product/#product-at-gitlab).
|
||||
To learn about the product philosophy GitLab the company uses in creating GitLab
|
||||
the product, visit our [Product Handbook page].
|
||||
|
||||
[Product Handbook page]: https://about.gitlab.com/handbook/product/#product-at-gitlab
|
||||
|
|
97
PROCESS.md
97
PROCESS.md
|
@ -64,7 +64,7 @@ The milestone of an issue that is currently being worked on by a community contr
|
|||
should not be set to a named GitLab milestone (e.g. 11.7, 11.8), until the associated
|
||||
merge request is very close to being merged, and we will likely know in which named
|
||||
GitLab milestone the issue will land. There are many factors that influence when
|
||||
a community contributor finishes an issue, or even at all. So we should set this
|
||||
a community contributor finishes an issue, or even at all. So we should set this
|
||||
milestone only when we have more certainty.
|
||||
|
||||
Note this only applies to issues currently assigned to community contributors. For
|
||||
|
@ -84,42 +84,28 @@ star, smile, etc.). Some good tips about code reviews can be found in our
|
|||
|
||||
[Code Review Guidelines]: https://docs.gitlab.com/ce/development/code_review.html
|
||||
|
||||
## Feature flags
|
||||
|
||||
Overview and details of feature flag processes in development of GitLab itself is described in [feature flags process documentation](https://docs.gitlab.com/ee/development/feature_flags/process.html).
|
||||
|
||||
Guides on how to include feature flags in your backend/frontend code while developing GitLab are described in [developing with feature flags documentation](https://docs.gitlab.com/ee/development/feature_flags/developing.html).
|
||||
|
||||
Getting access and how to expose the feature to users is detailed in [controlling feature flags documentation](https://docs.gitlab.com/ee/development/feature_flags/controls.html).
|
||||
|
||||
## Feature proposals from the 22nd to the 1st
|
||||
|
||||
To allow the Product and Engineering teams time to discuss issues that will be placed into an upcoming milestone,
|
||||
Product Managers must have their proposal for that milestone ready by the 22nd of each month.
|
||||
|
||||
This proposal will be shared with Engineering for discussion, feedback, and planning.
|
||||
The plan for the upcoming milestone must be finalized by the 1st of the month, one week before kickoff on the 8th.
|
||||
|
||||
## Feature freeze on the 7th for the release on the 22nd
|
||||
|
||||
After 7th at 23:59 (Pacific Time Zone) of each month, stable branch and RC1
|
||||
of the upcoming release (to be shipped on the 22nd) is created and deployed to GitLab.com.
|
||||
The stable branch is frozen at the most recent "qualifying commit" on master.
|
||||
A "qualifying commit" is one that is pushed before the feature freeze cutoff time
|
||||
and that passes all CI jobs (green pipeline).
|
||||
|
||||
Merge requests may still be merged into master during this
|
||||
period, but they will go into the _next_ release, unless they are manually
|
||||
cherry-picked into the stable branch.
|
||||
|
||||
By freezing the stable branches 2 weeks prior to a release, we reduce the risk
|
||||
of a last minute merge request potentially breaking things.
|
||||
|
||||
Any release candidate that gets created after this date can become a final
|
||||
release, hence the name release candidate.
|
||||
|
||||
### Feature flags
|
||||
|
||||
Merge requests that make changes hidden behind a feature flag, or remove an
|
||||
existing feature flag because a feature is deemed stable, may be merged (and
|
||||
picked into the stable branches) up to the 19th of the month. Such merge
|
||||
requests should have the ~"feature flag" label assigned, and don't require a
|
||||
corresponding exception request to be created.
|
||||
|
||||
In order to build the final package and present the feature for self-hosted
|
||||
customers, the feature flag should be removed. This should happen before the
|
||||
22nd, ideally _at least_ 2 days before. That means MRs with feature
|
||||
flags being picked at the 19th would have a quite tight schedule, so picking
|
||||
these _earlier_ is preferable.
|
||||
|
||||
While rare, release managers may decide to reject picking a change into a stable
|
||||
branch, even when feature flags are used. This might be necessary if the changes
|
||||
are deemed problematic, too invasive, or there simply isn't enough time to
|
||||
properly test how the changes behave on GitLab.com.
|
||||
The feature freeze on the 7th has been discontinued. [Transition period overview](https://gitlab.com/gitlab-org/release/docs/blob/21cbd409dd5f157fe252f254f3e897f01908abe2/general/deploy/auto-deploy-transition.md#transition)
|
||||
describes the change to this process. During the transition period, the only guarantee that
|
||||
a change will be included in the release on the 22nd is if the change has been
|
||||
deployed to GitLab.com prior to this date.
|
||||
|
||||
### Between the 1st and the 7th
|
||||
|
||||
|
@ -156,8 +142,12 @@ on behalf of the community member.
|
|||
|
||||
Every new feature or change should be shipped with its corresponding documentation
|
||||
in accordance with the
|
||||
[documentation process](https://docs.gitlab.com/ee/development/documentation/workflow.html)
|
||||
and [structure](https://docs.gitlab.com/ee/development/documentation/structure.html).
|
||||
[documentation process](https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html)
|
||||
and [structure](https://docs.gitlab.com/ee/development/documentation/structure.html) guides.
|
||||
Note that a technical writer will review all changes to documentation. This can occur
|
||||
in the same MR as the feature code, but [if there is not sufficient time or need,
|
||||
it can be planned via a follow-up issue for doc review](https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html#1-product-managers-role),
|
||||
and another MR, if needed. Regardless, complete docs must be merged with code by the freeze.
|
||||
|
||||
#### What happens if these deadlines are missed?
|
||||
|
||||
|
@ -186,8 +176,6 @@ and to prevent any last minute surprises.
|
|||
|
||||
Merge requests should still be complete, following the [definition of done][done].
|
||||
|
||||
#### Feature merge requests
|
||||
|
||||
If a merge request is not ready, but the developers and Product Manager
|
||||
responsible for the feature think it is essential that it is in the release,
|
||||
they can [ask for an exception](#asking-for-an-exception) in advance. This is
|
||||
|
@ -202,34 +190,17 @@ information, see
|
|||
[Automatic CE->EE merge][automatic_ce_ee_merge] and
|
||||
[Guidelines for implementing Enterprise Edition features][ee_features].
|
||||
|
||||
#### Documentation merge requests
|
||||
|
||||
Documentation is part of the product and must be shipped with the feature.
|
||||
|
||||
The single exception for the feature freeze is documentation, and it can
|
||||
be left to be **merged up to the 14th** if:
|
||||
|
||||
* There is a follow-up issue to add documentation.
|
||||
* It is assigned to the developer writing documentation for this feature, and they
|
||||
are aware of it.
|
||||
* It is in the correct milestone, with the labels ~Documentation, ~Deliverable,
|
||||
~missed-deliverable, and "pick into X.Y" applied.
|
||||
* It must be reviewed and approved by a technical writer.
|
||||
|
||||
For more information read the process for
|
||||
[documentation shipped late](https://docs.gitlab.com/ee/development/documentation/workflow.html#documentation-shipped-late).
|
||||
|
||||
### After the 7th
|
||||
|
||||
Once the stable branch is frozen, the only MRs that can be cherry-picked into
|
||||
the stable branch are:
|
||||
|
||||
* Fixes for [regressions](#regressions) where the affected version `xx.x` in `regression:xx.x` is the current release. See [Managing bugs](#managing-bugs) section.
|
||||
* Fixes for security issues
|
||||
* Fixes or improvements to automated QA scenarios
|
||||
* [Documentation updates](https://docs.gitlab.com/ee/development/documentation/workflow.html#documentation-shipped-late) for changes in the same release
|
||||
* New or updated translations (as long as they do not touch application code)
|
||||
* Changes that are behind a feature flag and have the ~"feature flag" label
|
||||
* Fixes for security issues.
|
||||
* Fixes or improvements to automated QA scenarios.
|
||||
* [Documentation improvements](https://docs.gitlab.com/ee/development/documentation/workflow.html) for feature changes made in the same release, though initial docs for these features should have already been merged by the freeze, as required.
|
||||
* New or updated translations (as long as they do not touch application code).
|
||||
* Changes that are behind a feature flag and have the ~"feature flag" label.
|
||||
|
||||
During the feature freeze all merge requests that are meant to go into the
|
||||
upcoming release should have the correct milestone assigned _and_ the
|
||||
|
@ -296,9 +267,7 @@ The two scenarios below can [bypass the exception request in the release process
|
|||
When a bug is found:
|
||||
1. Create an issue describing the problem in the most detailed way possible.
|
||||
1. If possible, provide links to real examples and how to reproduce the problem.
|
||||
1. Label the issue properly, using the [team label](https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#team-labels),
|
||||
the [subject label](https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#subject-labels)
|
||||
and any other label that may apply in the specific case
|
||||
1. Label the issue properly, by respecting the [Partial triage level](https://about.gitlab.com/handbook/engineering/issue-triage/#partial-triage).
|
||||
1. Notify the respective Engineering Manager to evaluate and apply the [Severity label](https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#severity-labels) and [Priority label](https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#priority-labels).
|
||||
The counterpart Product Manager is included to weigh-in on prioritization as needed.
|
||||
1. If the ~bug is **NOT** a regression:
|
||||
|
|
12
Pipfile
Normal file
12
Pipfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
[[source]]
|
||||
name = "pypi"
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
|
||||
[dev-packages]
|
||||
|
||||
[packages]
|
||||
docutils = "==0.13.1"
|
||||
|
||||
[requires]
|
||||
python_version = "3.4"
|
30
Pipfile.lock
generated
Normal file
30
Pipfile.lock
generated
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "ec82d5e7c10fd591aeebbc9b7b62d730f7fd70dc52e4e4818834891aa4194c73"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_version": "3.4"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"docutils": {
|
||||
"hashes": [
|
||||
"sha256:718c0f5fb677be0f34b781e04241c4067cbd9327b66bdd8e763201130f5175be",
|
||||
"sha256:cb3ebcb09242804f84bdbf0b26504077a054da6772c6f4d625f335cc53ebf94d",
|
||||
"sha256:de454f1015958450b72641165c08afe7023cd7e3944396448f2fb1b0ccba9d77"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.13.1"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
}
|
41
README.md
41
README.md
|
@ -1,29 +1,26 @@
|
|||
# GitLab
|
||||
|
||||
## Test coverage
|
||||
|
||||
- [![Ruby coverage](https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg?job=coverage)](https://gitlab-org.gitlab.io/gitlab-ce/coverage-ruby) Ruby
|
||||
- [![JavaScript coverage](https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg?job=karma)](https://gitlab-org.gitlab.io/gitlab-ce/coverage-javascript) JavaScript
|
||||
|
||||
## Canonical source
|
||||
|
||||
The canonical source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/).
|
||||
|
||||
The source of GitLab Enterprise Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ee).
|
||||
|
||||
## Free trial
|
||||
|
||||
You can request a free trial of GitLab Ultimate [on our website](https://about.gitlab.com/free-trial/).
|
||||
|
||||
## Open source software to collaborate on code
|
||||
|
||||
To see how GitLab looks please see the [features page on our website](https://about.gitlab.com/features/).
|
||||
|
||||
- Manage Git repositories with fine grained access controls that keep your code secure
|
||||
- Perform code reviews and enhance collaboration with merge requests
|
||||
- Complete continuous integration (CI) and CD pipelines to builds, test, and deploy your applications
|
||||
- Complete continuous integration (CI) and continuous deployment/delivery (CD) pipelines to build, test, and deploy your applications
|
||||
- Each project can also have an issue tracker, issue board, and a wiki
|
||||
- Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
|
||||
- Completely free and open source (MIT Expat license)
|
||||
|
||||
## Hiring
|
||||
|
||||
We're hiring developers, support people, and production engineers all the time, please see our [jobs page](https://about.gitlab.com/jobs/).
|
||||
|
||||
## Editions
|
||||
|
||||
There are two editions of GitLab:
|
||||
|
@ -31,6 +28,15 @@ There are two editions of GitLab:
|
|||
- GitLab Community Edition (CE) is available freely under the MIT Expat license.
|
||||
- GitLab Enterprise Edition (EE) includes [extra features](https://about.gitlab.com/pricing/#compare-options) that are more useful for organizations with more than 100 users. To use EE and get official support please [become a subscriber](https://about.gitlab.com/pricing/).
|
||||
|
||||
## Licensing
|
||||
|
||||
See the [LICENSE](LICENSE) file for licensing information as it pertains to
|
||||
files in this repository.
|
||||
|
||||
## Hiring
|
||||
|
||||
We're hiring developers, support people, and production engineers all the time, please see our [jobs page](https://about.gitlab.com/jobs/).
|
||||
|
||||
## Website
|
||||
|
||||
On [about.gitlab.com](https://about.gitlab.com/) you can find more information about:
|
||||
|
@ -54,20 +60,10 @@ Just select your operating system, download the respective package (Debian or RP
|
|||
|
||||
There are various other options to install GitLab, please refer to the [installation page on the GitLab website](https://about.gitlab.com/installation/) for more information.
|
||||
|
||||
You can access a new installation with the login **`root`** and password **`5iveL!fe`**, after login you are required to set a unique password.
|
||||
|
||||
## Contributing
|
||||
|
||||
GitLab is an open source project and we are very happy to accept community contributions. Please refer to [Contributing to GitLab page](https://about.gitlab.com/contributing/) for more details.
|
||||
|
||||
## Licensing
|
||||
|
||||
GitLab Community Edition (CE) is available freely under the MIT Expat license.
|
||||
|
||||
All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component.
|
||||
|
||||
All Documentation content that resides under the `doc/` directory of this repository is licensed under Creative Commons: CC BY-SA 4.0.
|
||||
|
||||
## Install a development environment
|
||||
|
||||
To work on GitLab itself, we recommend setting up your development environment with [the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit).
|
||||
|
@ -83,7 +79,7 @@ Instructions on how to start GitLab and how to run the tests can be found in the
|
|||
GitLab is a Ruby on Rails application that runs on the following software:
|
||||
|
||||
- Ubuntu/Debian/CentOS/RHEL/OpenSUSE
|
||||
- Ruby (MRI) 2.4
|
||||
- Ruby (MRI) 2.6.3
|
||||
- Git 2.8.4+
|
||||
- Redis 2.8+
|
||||
- PostgreSQL (preferred) or MySQL
|
||||
|
@ -108,7 +104,7 @@ For upgrading information please see our [update page](https://about.gitlab.com/
|
|||
|
||||
## Documentation
|
||||
|
||||
All documentation can be found on [docs.gitlab.com/ce/](https://docs.gitlab.com/ce/).
|
||||
All documentation can be found on <https://docs.gitlab.com>.
|
||||
|
||||
## Getting help
|
||||
|
||||
|
@ -125,4 +121,3 @@ Please see [Getting help for GitLab](https://about.gitlab.com/getting-help/) on
|
|||
## Is it awesome?
|
||||
|
||||
[These people](https://twitter.com/gitlab/likes) seem to like it.
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
11.8.10
|
||||
12.3.9
|
||||
|
|
BIN
app/assets/images/auth_buttons/salesforce_64.png
Normal file
BIN
app/assets/images/auth_buttons/salesforce_64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
app/assets/images/select2-spinner.gif
Normal file
BIN
app/assets/images/select2-spinner.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
app/assets/images/select2.png
Normal file
BIN
app/assets/images/select2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 613 B |
BIN
app/assets/images/select2x2.png
Normal file
BIN
app/assets/images/select2x2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 845 B |
|
@ -0,0 +1,45 @@
|
|||
<script>
|
||||
import { mapState, mapGetters, mapActions } from 'vuex';
|
||||
import { GlLoadingIcon } from '@gitlab/ui';
|
||||
import statisticsLabels from '../constants';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GlLoadingIcon,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statisticsLabels,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(['isLoading', 'statistics']),
|
||||
...mapGetters(['getStatistics']),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchStatistics();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['fetchStatistics']),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="info-well">
|
||||
<div class="well-segment admin-well admin-well-statistics">
|
||||
<h4>{{ __('Statistics') }}</h4>
|
||||
<gl-loading-icon v-if="isLoading" size="md" class="my-3" />
|
||||
<template v-else>
|
||||
<p
|
||||
v-for="statistic in getStatistics(statisticsLabels)"
|
||||
:key="statistic.key"
|
||||
class="js-stats"
|
||||
>
|
||||
{{ statistic.label }}
|
||||
<span class="light float-right">{{ statistic.value }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
14
app/assets/javascripts/admin/statistics_panel/constants.js
Normal file
14
app/assets/javascripts/admin/statistics_panel/constants.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { s__ } from '~/locale';
|
||||
|
||||
const statisticsLabels = {
|
||||
forks: s__('AdminStatistics|Forks'),
|
||||
issues: s__('AdminStatistics|Issues'),
|
||||
mergeRequests: s__('AdminStatistics|Merge Requests'),
|
||||
notes: s__('AdminStatistics|Notes'),
|
||||
snippets: s__('AdminStatistics|Snippets'),
|
||||
sshKeys: s__('AdminStatistics|SSH Keys'),
|
||||
milestones: s__('AdminStatistics|Milestones'),
|
||||
activeUsers: s__('AdminStatistics|Active Users'),
|
||||
};
|
||||
|
||||
export default statisticsLabels;
|
22
app/assets/javascripts/admin/statistics_panel/index.js
Normal file
22
app/assets/javascripts/admin/statistics_panel/index.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import Vue from 'vue';
|
||||
import StatisticsPanelApp from './components/app.vue';
|
||||
import createStore from './store';
|
||||
|
||||
export default function(el) {
|
||||
if (!el) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const store = createStore();
|
||||
|
||||
return new Vue({
|
||||
el,
|
||||
store,
|
||||
components: {
|
||||
StatisticsPanelApp,
|
||||
},
|
||||
render(h) {
|
||||
return h(StatisticsPanelApp);
|
||||
},
|
||||
});
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import Api from '~/api';
|
||||
import { s__ } from '~/locale';
|
||||
import createFlash from '~/flash';
|
||||
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
||||
import * as types from './mutation_types';
|
||||
|
||||
export const requestStatistics = ({ commit }) => commit(types.REQUEST_STATISTICS);
|
||||
|
||||
export const fetchStatistics = ({ dispatch }) => {
|
||||
dispatch('requestStatistics');
|
||||
|
||||
Api.adminStatistics()
|
||||
.then(({ data }) => {
|
||||
dispatch('receiveStatisticsSuccess', convertObjectPropsToCamelCase(data, { deep: true }));
|
||||
})
|
||||
.catch(error => dispatch('receiveStatisticsError', error));
|
||||
};
|
||||
|
||||
export const receiveStatisticsSuccess = ({ commit }, statistics) =>
|
||||
commit(types.RECEIVE_STATISTICS_SUCCESS, statistics);
|
||||
|
||||
export const receiveStatisticsError = ({ commit }, error) => {
|
||||
commit(types.RECEIVE_STATISTICS_ERROR, error);
|
||||
createFlash(s__('AdminDashboard|Error loading the statistics. Please try again'));
|
||||
};
|
||||
|
||||
// prevent babel-plugin-rewire from generating an invalid default during karma tests
|
||||
export default () => {};
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* Merges the statisticsLabels with the state's data
|
||||
* and returns an array of the following form:
|
||||
* [{ key: "forks", label: "Forks", value: 50 }]
|
||||
*/
|
||||
export const getStatistics = state => labels =>
|
||||
Object.keys(labels).map(key => {
|
||||
const result = {
|
||||
key,
|
||||
label: labels[key],
|
||||
value: state.statistics && state.statistics[key] ? state.statistics[key] : null,
|
||||
};
|
||||
return result;
|
||||
});
|
||||
|
||||
// prevent babel-plugin-rewire from generating an invalid default during karma tests
|
||||
export default () => {};
|
16
app/assets/javascripts/admin/statistics_panel/store/index.js
Normal file
16
app/assets/javascripts/admin/statistics_panel/store/index.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
import * as actions from './actions';
|
||||
import * as getters from './getters';
|
||||
import mutations from './mutations';
|
||||
import state from './state';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default () =>
|
||||
new Vuex.Store({
|
||||
actions,
|
||||
getters,
|
||||
mutations,
|
||||
state: state(),
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
export const REQUEST_STATISTICS = 'REQUEST_STATISTICS';
|
||||
export const RECEIVE_STATISTICS_SUCCESS = 'RECEIVE_STATISTICS_SUCCESS';
|
||||
export const RECEIVE_STATISTICS_ERROR = 'RECEIVE_STATISTICS_ERROR';
|
|
@ -0,0 +1,16 @@
|
|||
import * as types from './mutation_types';
|
||||
|
||||
export default {
|
||||
[types.REQUEST_STATISTICS](state) {
|
||||
state.isLoading = true;
|
||||
},
|
||||
[types.RECEIVE_STATISTICS_SUCCESS](state, data) {
|
||||
state.isLoading = false;
|
||||
state.error = null;
|
||||
state.statistics = data;
|
||||
},
|
||||
[types.RECEIVE_STATISTICS_ERROR](state, error) {
|
||||
state.isLoading = false;
|
||||
state.error = error;
|
||||
},
|
||||
};
|
|
@ -0,0 +1,5 @@
|
|||
export default () => ({
|
||||
error: null,
|
||||
isLoading: false,
|
||||
statistics: null,
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
isCustomStageForm: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
showAddStageForm: () => {},
|
||||
hideAddStageForm: () => {},
|
||||
},
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
export default {};
|
|
@ -1,6 +1,7 @@
|
|||
import $ from 'jquery';
|
||||
import _ from 'underscore';
|
||||
import axios from './lib/utils/axios_utils';
|
||||
import { joinPaths } from './lib/utils/url_utility';
|
||||
|
||||
const Api = {
|
||||
groupsPath: '/api/:version/groups.json',
|
||||
|
@ -11,7 +12,10 @@ const Api = {
|
|||
groupProjectsPath: '/api/:version/groups/:id/projects.json',
|
||||
projectsPath: '/api/:version/projects.json',
|
||||
projectPath: '/api/:version/projects/:id',
|
||||
projectLabelsPath: '/:namespace_path/:project_path/labels',
|
||||
forkedProjectsPath: '/api/:version/projects/:id/forks',
|
||||
projectLabelsPath: '/:namespace_path/:project_path/-/labels',
|
||||
projectUsersPath: '/api/:version/projects/:id/users',
|
||||
projectMergeRequestsPath: '/api/:version/projects/:id/merge_requests',
|
||||
projectMergeRequestPath: '/api/:version/projects/:id/merge_requests/:mrid',
|
||||
projectMergeRequestChangesPath: '/api/:version/projects/:id/merge_requests/:mrid/changes',
|
||||
projectMergeRequestVersionsPath: '/api/:version/projects/:id/merge_requests/:mrid/versions',
|
||||
|
@ -21,6 +25,7 @@ const Api = {
|
|||
issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key',
|
||||
projectTemplatePath: '/api/:version/projects/:id/templates/:type/:key',
|
||||
projectTemplatesPath: '/api/:version/projects/:id/templates/:type',
|
||||
userCountsPath: '/api/:version/user_counts',
|
||||
usersPath: '/api/:version/users.json',
|
||||
userPath: '/api/:version/users/:id',
|
||||
userStatusPath: '/api/:version/users/:id/status',
|
||||
|
@ -31,6 +36,8 @@ const Api = {
|
|||
branchSinglePath: '/api/:version/projects/:id/repository/branches/:branch',
|
||||
createBranchPath: '/api/:version/projects/:id/repository/branches',
|
||||
releasesPath: '/api/:version/projects/:id/releases',
|
||||
mergeRequestsPipeline: '/api/:version/projects/:id/merge_requests/:merge_request_iid/pipelines',
|
||||
adminStatisticsPath: 'api/:version/application/statistics',
|
||||
|
||||
group(groupId, callback) {
|
||||
const url = Api.buildUrl(Api.groupPath).replace(':id', groupId);
|
||||
|
@ -104,6 +111,20 @@ const Api = {
|
|||
});
|
||||
},
|
||||
|
||||
projectUsers(projectPath, query = '', options = {}) {
|
||||
const url = Api.buildUrl(this.projectUsersPath).replace(':id', encodeURIComponent(projectPath));
|
||||
|
||||
return axios
|
||||
.get(url, {
|
||||
params: {
|
||||
search: query,
|
||||
per_page: 20,
|
||||
...options,
|
||||
},
|
||||
})
|
||||
.then(({ data }) => data);
|
||||
},
|
||||
|
||||
// Return single project
|
||||
project(projectPath) {
|
||||
const url = Api.buildUrl(Api.projectPath).replace(':id', encodeURIComponent(projectPath));
|
||||
|
@ -111,6 +132,37 @@ const Api = {
|
|||
return axios.get(url);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all projects for a forked relationship to a specified project
|
||||
* @param {string} projectPath - Path or ID of a project
|
||||
* @param {Object} params - Get request parameters
|
||||
* @returns {Promise} - Request promise
|
||||
*/
|
||||
projectForks(projectPath, params) {
|
||||
const url = Api.buildUrl(Api.forkedProjectsPath).replace(
|
||||
':id',
|
||||
encodeURIComponent(projectPath),
|
||||
);
|
||||
|
||||
return axios.get(url, { params });
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all Merge Requests for a project, eventually filtering based on
|
||||
* supplied parameters
|
||||
* @param projectPath
|
||||
* @param params
|
||||
* @returns {Promise}
|
||||
*/
|
||||
projectMergeRequests(projectPath, params = {}) {
|
||||
const url = Api.buildUrl(Api.projectMergeRequestsPath).replace(
|
||||
':id',
|
||||
encodeURIComponent(projectPath),
|
||||
);
|
||||
|
||||
return axios.get(url, { params });
|
||||
},
|
||||
|
||||
// Return Merge Request for project
|
||||
projectMergeRequest(projectPath, mergeRequestId, params = {}) {
|
||||
const url = Api.buildUrl(Api.projectMergeRequestPath)
|
||||
|
@ -278,6 +330,11 @@ const Api = {
|
|||
});
|
||||
},
|
||||
|
||||
userCounts() {
|
||||
const url = Api.buildUrl(this.userCountsPath);
|
||||
return axios.get(url);
|
||||
},
|
||||
|
||||
userStatus(id, options) {
|
||||
const url = Api.buildUrl(this.userStatusPath).replace(':id', encodeURIComponent(id));
|
||||
return axios.get(url, {
|
||||
|
@ -315,18 +372,27 @@ const Api = {
|
|||
});
|
||||
},
|
||||
|
||||
postMergeRequestPipeline(id, { mergeRequestId }) {
|
||||
const url = Api.buildUrl(this.mergeRequestsPipeline)
|
||||
.replace(':id', encodeURIComponent(id))
|
||||
.replace(':merge_request_iid', mergeRequestId);
|
||||
|
||||
return axios.post(url);
|
||||
},
|
||||
|
||||
releases(id) {
|
||||
const url = Api.buildUrl(this.releasesPath).replace(':id', encodeURIComponent(id));
|
||||
|
||||
return axios.get(url);
|
||||
},
|
||||
|
||||
adminStatistics() {
|
||||
const url = Api.buildUrl(this.adminStatisticsPath);
|
||||
return axios.get(url);
|
||||
},
|
||||
|
||||
buildUrl(url) {
|
||||
let urlRoot = '';
|
||||
if (gon.relative_url_root != null) {
|
||||
urlRoot = gon.relative_url_root;
|
||||
}
|
||||
return urlRoot + url.replace(':version', gon.api_version);
|
||||
return joinPaths(gon.relative_url_root || '', url.replace(':version', gon.api_version));
|
||||
},
|
||||
};
|
||||
|
||||
|
|
16
app/assets/javascripts/avatar_picker.js
Normal file
16
app/assets/javascripts/avatar_picker.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import $ from 'jquery';
|
||||
|
||||
export default function initAvatarPicker() {
|
||||
$('.js-choose-avatar-button').on('click', function onClickAvatar() {
|
||||
const form = $(this).closest('form');
|
||||
return form.find('.js-avatar-input').click();
|
||||
});
|
||||
|
||||
$('.js-avatar-input').on('change', function onChangeAvatarInput() {
|
||||
const form = $(this).closest('form');
|
||||
const filename = $(this)
|
||||
.val()
|
||||
.replace(/^.*[\\\/]/, ''); // eslint-disable-line no-useless-escape
|
||||
return form.find('.js-avatar-filename').text(filename);
|
||||
});
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable class-methods-use-this */
|
||||
/* eslint-disable class-methods-use-this, @gitlab/i18n/no-non-i18n-strings */
|
||||
|
||||
import $ from 'jquery';
|
||||
import _ from 'underscore';
|
||||
|
@ -8,6 +8,7 @@ import { updateTooltipTitle } from './lib/utils/common_utils';
|
|||
import { isInVueNoteablePage } from './lib/utils/dom_utils';
|
||||
import flash from './flash';
|
||||
import axios from './lib/utils/axios_utils';
|
||||
import bp from './breakpoints';
|
||||
|
||||
const animationEndEventString = 'animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd';
|
||||
const transitionEndEventString = 'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd';
|
||||
|
@ -264,7 +265,10 @@ export class AwardsHandler {
|
|||
const css = {
|
||||
top: `${$addBtn.offset().top + $addBtn.outerHeight()}px`,
|
||||
};
|
||||
if (position === 'right') {
|
||||
// for xs screen we position the element on center
|
||||
if (bp.getBreakpointSize() === 'xs') {
|
||||
css.left = '5%';
|
||||
} else if (position === 'right') {
|
||||
css.left = `${$addBtn.offset().left - $menu.outerWidth() + 20}px`;
|
||||
$menu.addClass('is-aligned-right');
|
||||
} else {
|
||||
|
|
|
@ -3,6 +3,8 @@ import Icon from '~/vue_shared/components/icon.vue';
|
|||
import { GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui';
|
||||
|
||||
export default {
|
||||
// name: 'Badge' is a false positive: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/25
|
||||
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
|
||||
name: 'Badge',
|
||||
components: {
|
||||
Icon,
|
||||
|
|
|
@ -90,7 +90,7 @@ export default {
|
|||
},
|
||||
badgeImageUrlExample() {
|
||||
const exampleUrl =
|
||||
'https://example.gitlab.com/%{project_path}/badges/%{default_branch}/badge.svg';
|
||||
'https://example.gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg';
|
||||
return sprintf(s__('Badges|e.g. %{exampleUrl}'), {
|
||||
exampleUrl,
|
||||
});
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import { sprintf, __ } from '~/locale';
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
resolveButtonTitle() {
|
||||
let title = __('Mark comment as resolved');
|
||||
|
||||
if (this.resolvedBy) {
|
||||
title = sprintf(__('Resolved by %{name}'), { name: this.resolvedBy.name });
|
||||
}
|
||||
|
||||
return title;
|
||||
},
|
||||
},
|
||||
};
|
|
@ -1,5 +1,6 @@
|
|||
import $ from 'jquery';
|
||||
import Clipboard from 'clipboard';
|
||||
import { sprintf, __ } from '~/locale';
|
||||
|
||||
function showTooltip(target, title) {
|
||||
const $target = $(target);
|
||||
|
@ -16,7 +17,7 @@ function showTooltip(target, title) {
|
|||
}
|
||||
|
||||
function genericSuccess(e) {
|
||||
showTooltip(e.trigger, 'Copied');
|
||||
showTooltip(e.trigger, __('Copied'));
|
||||
// Clear the selection and blur the trigger so it loses its border
|
||||
e.clearSelection();
|
||||
$(e.trigger).blur();
|
||||
|
@ -33,7 +34,7 @@ function genericError(e) {
|
|||
} else {
|
||||
key = 'Ctrl';
|
||||
}
|
||||
showTooltip(e.trigger, `Press ${key}-C to copy`);
|
||||
showTooltip(e.trigger, sprintf(__(`Press %{key}-C to copy`), { key }));
|
||||
}
|
||||
|
||||
export default function initCopyToClipboard() {
|
||||
|
|
|
@ -10,10 +10,10 @@ export class CopyAsGFM {
|
|||
const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);
|
||||
if (isIOS) return;
|
||||
|
||||
$(document).on('copy', '.md, .wiki', e => {
|
||||
$(document).on('copy', '.md', e => {
|
||||
CopyAsGFM.copyAsGFM(e, CopyAsGFM.transformGFMSelection);
|
||||
});
|
||||
$(document).on('copy', 'pre.code.highlight, .diff-content .line_content', e => {
|
||||
$(document).on('copy', 'pre.code.highlight, table.code td.line_content', e => {
|
||||
CopyAsGFM.copyAsGFM(e, CopyAsGFM.transformCodeSelection);
|
||||
});
|
||||
$(document).on('paste', '.js-gfm-input', CopyAsGFM.pasteGFM);
|
||||
|
@ -99,7 +99,7 @@ export class CopyAsGFM {
|
|||
}
|
||||
|
||||
static transformGFMSelection(documentFragment) {
|
||||
const gfmElements = documentFragment.querySelectorAll('.md, .wiki');
|
||||
const gfmElements = documentFragment.querySelectorAll('.md');
|
||||
switch (gfmElements.length) {
|
||||
case 0: {
|
||||
return documentFragment;
|
||||
|
@ -173,7 +173,9 @@ export class CopyAsGFM {
|
|||
wrapEl.appendChild(node.cloneNode(true));
|
||||
const doc = DOMParser.fromSchema(schema.default).parse(wrapEl);
|
||||
|
||||
const res = markdownSerializer.default.serialize(doc);
|
||||
const res = markdownSerializer.default.serialize(doc, {
|
||||
tightLists: true,
|
||||
});
|
||||
return res;
|
||||
})
|
||||
.catch(() => {});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import $ from 'jquery';
|
||||
import { parseBoolean } from '~/lib/utils/common_utils';
|
||||
import GfmAutoComplete from '~/gfm_auto_complete';
|
||||
import GfmAutoComplete from 'ee_else_ce/gfm_auto_complete';
|
||||
|
||||
export default function initGFMInput() {
|
||||
$('.js-gfm-input:not(.js-vue-textarea)').each((i, el) => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* eslint-disable class-methods-use-this */
|
||||
|
||||
import { Node } from 'tiptap';
|
||||
import { __ } from '~/locale';
|
||||
|
||||
// Transforms generated HTML back to GFM for Banzai::Filter::TableOfContentsFilter
|
||||
export default class TableOfContents extends Node {
|
||||
|
@ -22,7 +23,7 @@ export default class TableOfContents extends Node {
|
|||
priority: 51,
|
||||
},
|
||||
],
|
||||
toDOM: () => ['p', { class: 'table-of-contents' }, 'Table of Contents'],
|
||||
toDOM: () => ['p', { class: 'table-of-contents' }, __('Table of Contents')],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,10 @@ import $ from 'jquery';
|
|||
import syntaxHighlight from '~/syntax_highlight';
|
||||
import renderMath from './render_math';
|
||||
import renderMermaid from './render_mermaid';
|
||||
import renderMetrics from './render_metrics';
|
||||
import highlightCurrentUser from './highlight_current_user';
|
||||
import initUserPopovers from '../../user_popovers';
|
||||
import initMRPopovers from '../../mr_popover';
|
||||
|
||||
// Render GitLab flavoured Markdown
|
||||
//
|
||||
|
@ -15,6 +17,8 @@ $.fn.renderGFM = function renderGFM() {
|
|||
renderMermaid(this.find('.js-render-mermaid'));
|
||||
highlightCurrentUser(this.find('.gfm-project_member').get());
|
||||
initUserPopovers(this.find('.gfm-project_member').get());
|
||||
initMRPopovers(this.find('.gfm-merge_request').get());
|
||||
renderMetrics(this.find('.js-render-metrics').get());
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import $ from 'jquery';
|
||||
import { __ } from '~/locale';
|
||||
import flash from '~/flash';
|
||||
import { s__, sprintf } from '~/locale';
|
||||
|
||||
// Renders math using KaTeX in any element with the
|
||||
// `js-render-math` class
|
||||
|
@ -10,21 +9,131 @@ import flash from '~/flash';
|
|||
// <code class="js-render-math"></div>
|
||||
//
|
||||
|
||||
// Loop over all math elements and render math
|
||||
function renderWithKaTeX(elements, katex) {
|
||||
elements.each(function katexElementsLoop() {
|
||||
const mathNode = $('<span></span>');
|
||||
const $this = $(this);
|
||||
const MAX_MATH_CHARS = 1000;
|
||||
const MAX_RENDER_TIME_MS = 2000;
|
||||
|
||||
const display = $this.attr('data-math-style') === 'display';
|
||||
try {
|
||||
katex.render($this.text(), mathNode.get(0), { displayMode: display, throwOnError: false });
|
||||
mathNode.insertAfter($this);
|
||||
$this.remove();
|
||||
} catch (err) {
|
||||
throw err;
|
||||
// These messages might be used with inline errors in the future. Keep them around. For now, we will
|
||||
// display a single error message using flash().
|
||||
|
||||
// const CHAR_LIMIT_EXCEEDED_MSG = sprintf(
|
||||
// s__(
|
||||
// 'math|The following math is too long. For performance reasons, math blocks are limited to %{maxChars} characters. Try splitting up this block, or include an image instead.',
|
||||
// ),
|
||||
// { maxChars: MAX_MATH_CHARS },
|
||||
// );
|
||||
// const RENDER_TIME_EXCEEDED_MSG = s__(
|
||||
// "math|The math in this entry is taking too long to render. Any math below this point won't be shown. Consider splitting it among multiple entries.",
|
||||
// );
|
||||
|
||||
const RENDER_FLASH_MSG = sprintf(
|
||||
s__(
|
||||
'math|The math in this entry is taking too long to render and may not be displayed as expected. For performance reasons, math blocks are also limited to %{maxChars} characters. Consider splitting up large formulae, splitting math blocks among multiple entries, or using an image instead.',
|
||||
),
|
||||
{ maxChars: MAX_MATH_CHARS },
|
||||
);
|
||||
|
||||
// Wait for the browser to reflow the layout. Reflowing SVG takes time.
|
||||
// This has to wrap the inner function, otherwise IE/Edge throw "invalid calling object".
|
||||
const waitForReflow = fn => {
|
||||
window.requestAnimationFrame(fn);
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders math blocks sequentially while protecting against DoS attacks. Math blocks have a maximum character limit of MAX_MATH_CHARS. If rendering math takes longer than MAX_RENDER_TIME_MS, all subsequent math blocks are skipped and an error message is shown.
|
||||
*/
|
||||
class SafeMathRenderer {
|
||||
/*
|
||||
How this works:
|
||||
|
||||
The performance bottleneck in rendering math is in the browser trying to reflow the generated SVG.
|
||||
During this time, the JS is blocked and the page becomes unresponsive.
|
||||
We want to render math blocks one by one until a certain time is exceeded, after which we stop
|
||||
rendering subsequent math blocks, to protect against DoS. However, browsers do reflowing in an
|
||||
asynchronous task, so we can't time it synchronously.
|
||||
|
||||
SafeMathRenderer essentially does the following:
|
||||
1. Replaces all math blocks with placeholders so that they're not mistakenly rendered twice.
|
||||
2. Places each placeholder element in a queue.
|
||||
3. Renders the element at the head of the queue and waits for reflow.
|
||||
4. After reflow, gets the elapsed time since step 3 and repeats step 3 until the queue is empty.
|
||||
*/
|
||||
queue = [];
|
||||
totalMS = 0;
|
||||
|
||||
constructor(elements, katex) {
|
||||
this.elements = elements;
|
||||
this.katex = katex;
|
||||
|
||||
this.renderElement = this.renderElement.bind(this);
|
||||
this.render = this.render.bind(this);
|
||||
}
|
||||
|
||||
renderElement() {
|
||||
if (!this.queue.length) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
const el = this.queue.shift();
|
||||
const text = el.textContent;
|
||||
|
||||
el.removeAttribute('style');
|
||||
|
||||
if (this.totalMS >= MAX_RENDER_TIME_MS || text.length > MAX_MATH_CHARS) {
|
||||
if (!this.flashShown) {
|
||||
flash(RENDER_FLASH_MSG);
|
||||
this.flashShown = true;
|
||||
}
|
||||
|
||||
// Show unrendered math code
|
||||
const codeElement = document.createElement('pre');
|
||||
codeElement.className = 'code';
|
||||
codeElement.textContent = el.textContent;
|
||||
el.parentNode.replaceChild(codeElement, el);
|
||||
|
||||
// Render the next math
|
||||
this.renderElement();
|
||||
} else {
|
||||
this.startTime = Date.now();
|
||||
|
||||
try {
|
||||
el.innerHTML = this.katex.renderToString(text, {
|
||||
displayMode: el.getAttribute('data-math-style') === 'display',
|
||||
throwOnError: true,
|
||||
maxSize: 20,
|
||||
maxExpand: 20,
|
||||
});
|
||||
} catch (e) {
|
||||
// Don't show a flash for now because it would override an existing flash message
|
||||
el.textContent = s__('math|There was an error rendering this math block');
|
||||
// el.style.color = '#d00';
|
||||
el.className = 'katex-error';
|
||||
}
|
||||
|
||||
// Give the browser time to reflow the svg
|
||||
waitForReflow(() => {
|
||||
const deltaTime = Date.now() - this.startTime;
|
||||
this.totalMS += deltaTime;
|
||||
|
||||
this.renderElement();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
// Replace math blocks with a placeholder so they aren't rendered twice
|
||||
this.elements.forEach(el => {
|
||||
const placeholder = document.createElement('span');
|
||||
placeholder.style.display = 'none';
|
||||
placeholder.setAttribute('data-math-style', el.getAttribute('data-math-style'));
|
||||
placeholder.textContent = el.textContent;
|
||||
el.parentNode.replaceChild(placeholder, el);
|
||||
this.queue.push(placeholder);
|
||||
});
|
||||
|
||||
// If we wait for the browser thread to settle down a bit, math rendering becomes 5-10x faster
|
||||
// and less prone to timeouts.
|
||||
setTimeout(this.renderElement, 400);
|
||||
}
|
||||
}
|
||||
|
||||
export default function renderMath($els) {
|
||||
|
@ -34,7 +143,8 @@ export default function renderMath($els) {
|
|||
import(/* webpackChunkName: 'katex' */ 'katex/dist/katex.min.css'),
|
||||
])
|
||||
.then(([katex]) => {
|
||||
renderWithKaTeX($els, katex);
|
||||
const renderer = new SafeMathRenderer($els.get(), katex);
|
||||
renderer.render();
|
||||
})
|
||||
.catch(() => flash(__('An error occurred while rendering KaTeX')));
|
||||
.catch(() => {});
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue