...
 
Commits (3726)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

{
"presets": [["latest", { "es2015": { "modules": false } }], "stage-2"],
"env": {
"karma": {
"plugins": ["rewire"]
},
"coverage": {
"plugins": [
[
"istanbul",
{
"exclude": ["spec/javascripts/**/*", "app/assets/javascripts/locale/**/app.js"]
}
],
[
"transform-define",
{
"process.env.BABEL_ENV": "coverage"
}
],
"rewire"
]
}
}
}
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',
];
// 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');
}
module.exports = { presets, plugins };
......@@ -10,3 +10,5 @@
/vendor/
karma.config.js
webpack.config.js
ee/app/assets/javascripts/shared/snowplow/sp.js
---
env:
browser: true
es6: true
extends:
- airbnb-base
- plugin:vue/recommended
- '@gitlab'
globals:
__webpack_public_path__: true
gl: false
gon: false
localStorage: false
parserOptions:
parser: babel-eslint
plugins:
- filenames
- import
- html
- promise
settings:
html/html-extensions:
- ".html"
- ".html.raw"
- '.html'
- '.html.raw'
import/resolver:
webpack:
config: "./config/webpack.config.js"
config: './config/webpack.config.js'
rules:
filenames/match-regex:
- error
- "^[a-z0-9_]+$"
import/no-commonjs: error
no-multiple-empty-lines:
- error
- max: 1
promise/catch-or-return: error
no-underscore-dangle:
- error
- allow:
- __
- _links
no-mixed-operators: off
vue/html-self-closing:
- error
- html:
void: always
normal: never
component: always
svg: always
math: always
## Conflicting rules with prettier:
space-before-function-paren: off
curly: off
arrow-parens: off
function-paren-newline: off
object-curly-newline: off
padded-blocks: off
# Disabled for now, to make the eslint 3 -> eslint 4 update smoother
## Indent rule. We are using the old for now: https://eslint.org/docs/user-guide/migrating-to-4.0.0#indent-rewrite
indent: off
indent-legacy:
- __
- _links
# Disabled for now, to make the airbnb-base 12.1.0 -> 13.1.0 update smoother
no-else-return:
- error
- 2
- SwitchCase: 1
VariableDeclarator: 1
outerIIFEBody: 1
FunctionDeclaration:
parameters: 1
body: 1
FunctionExpression:
parameters: 1
body: 1
- allowElseIf: true
import/no-useless-path-segments: off
lines-between-class-members: off
# Disabled for now, to make the plugin-vue 4.5 -> 5.0 update smoother
vue/html-closing-bracket-newline: off
vue/html-closing-bracket-spacing: off
vue/no-confusing-v-for-v-if: error
vue/no-unused-components: off
vue/no-use-v-if-with-v-for: off
vue/no-v-html: off
......@@ -78,3 +78,4 @@ eslint-report.html
/.gitlab_pages_secret
package-lock.json
/junit_rspec.xml
/junit_karma.xml
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-golang-1.9-git-2.18-chrome-67.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29"
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.4.4-golang-1.9-git-2.18-chrome-69.0-node-8.x-yarn-1.2-postgresql-9.6-graphicsmagick-1.3.29"
.dedicated-runner: &dedicated-runner
retry: 1
......@@ -72,10 +72,7 @@ stages:
.use-pg: &use-pg
services:
# As of Jan 2018, we don't have a strong reason to upgrade to 9.6 for CI yet,
# so using the least common denominator ensures backwards compatibility
# (as many users are still using 9.2).
- postgres:9.2
- postgres:9.6
- redis:alpine
.use-mysql: &use-mysql
......@@ -125,7 +122,7 @@ stages:
# Skip all jobs except the ones that begin with 'docs/'.
# Used for commits including ONLY documentation changes.
# https://docs.gitlab.com/ce/development/writing_documentation.html#testing
# https://docs.gitlab.com/ce/development/documentation/#testing
.except-docs: &except-docs
except:
- /(^docs[\/-].*|.*-docs$)/
......@@ -160,7 +157,6 @@ stages:
.single-script-job: &single-script-job
image: ruby:2.4-alpine
before_script: []
stage: test
cache: {}
dependencies: []
......@@ -173,7 +169,7 @@ stages:
- export SCRIPT_NAME="${SCRIPT_NAME:-$CI_JOB_NAME}"
- apk add --update openssl
- wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/$SCRIPT_NAME
- chmod 755 $SCRIPT_NAME
- chmod 755 $(basename $SCRIPT_NAME)
.rake-exec: &rake-exec
<<: *dedicated-no-docs-no-db-pull-cache-job
......@@ -342,8 +338,8 @@ stages:
variables:
SETUP_DB: "false"
script:
- CE_HEAD=$(ruby -r./scripts/ee_specific_check/ee_specific_check -e'puts EESpecificCheck.fetch_remote_ce_branch')
- git checkout -f $CE_HEAD
- ruby -r./scripts/ee_specific_check/ee_specific_check -e'EESpecificCheck.fetch_remote_ce_branch'
- git checkout -f FETCH_HEAD
- . scripts/utils.sh
- . scripts/prepare_build.sh
- date
......@@ -365,6 +361,7 @@ package-and-qa:
SCRIPT_NAME: trigger-build
retry: 0
script:
- gem install gitlab --no-document
- ./$SCRIPT_NAME omnibus
when: manual
only:
......@@ -391,7 +388,7 @@ review-docs-deploy-manual:
<<: *review-docs
stage: build
script:
- gem install gitlab --no-ri --no-rdoc
- gem install gitlab --no-document
- ./$SCRIPT_NAME deploy
when: manual
only:
......@@ -405,7 +402,7 @@ review-docs-deploy:
<<: *review-docs
stage: post-test
script:
- gem install gitlab --no-ri --no-rdoc
- gem install gitlab --no-document
- ./$SCRIPT_NAME deploy
only:
- /(^docs[\/-].*|.*-docs$)/@gitlab-org/gitlab-ce
......@@ -420,7 +417,7 @@ review-docs-cleanup:
name: review-docs/$CI_COMMIT_REF_SLUG
action: stop
script:
- gem install gitlab --no-ri --no-rdoc
- gem install gitlab --no-document
- ./$SCRIPT_NAME cleanup
when: manual
only:
......@@ -431,7 +428,7 @@ review-docs-cleanup:
# Trigger a docker image build in CNG (Cloud Native GitLab) repository
#
cloud-native-image:
stage: build
stage: test
image: ruby:2.4-alpine
before_script: []
allow_failure: true
......@@ -471,7 +468,7 @@ retrieve-tests-metadata:
retry: 0
only:
- branches
- //@gitlab-org/gitlab-ee
- branches@gitlab-org/gitlab-ee
except:
- master
- /[\d-]+-stable(-ee)?/
......@@ -499,7 +496,7 @@ update-tests-metadata:
- rspec_flaky/
policy: push
script:
- retry gem install fog-aws mime-types activesupport --no-ri --no-rdoc
- retry gem install fog-aws mime-types activesupport --no-document
- scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json
- scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg-ee_node_*.json
- scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json
......@@ -579,10 +576,10 @@ setup-test-env:
- vendor/gitaly-ruby
danger-review:
<<: *pull-cache
image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger
stage: test
allow_failure: true
cache: {}
dependencies: []
before_script: []
only:
......@@ -596,6 +593,8 @@ danger-review:
- $CI_COMMIT_REF_NAME =~ /.*-stable(-ee)?-prepare-.*/
script:
- git version
- node --version
- yarn install --frozen-lockfile --cache-folder .yarn-cache
- danger --fail-on-errors=true
# EE jobs
......@@ -770,7 +769,7 @@ static-analysis:
docs lint:
<<: *dedicated-runner
<<: *except-qa
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:nanoc-bootstrap-ruby-2.4-alpine"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-docs-lint"
stage: test
variables:
SETUP_DB: "false"
......@@ -780,8 +779,8 @@ docs lint:
script:
- scripts/lint-doc.sh
- scripts/lint-changelog-yaml
- mv doc/ /nanoc/content/
- cd /nanoc
- mv doc/ /tmp/gitlab-docs/content/
- cd /tmp/gitlab-docs
# Build HTML from Markdown
- bundle exec nanoc
# Check the internal links
......@@ -888,7 +887,6 @@ gitlab:assets:compile:
SETUP_DB: "false"
SKIP_STORAGE_VALIDATION: "true"
WEBPACK_REPORT: "true"
NO_COMPRESSION: "true"
# we override the max_old_space_size to prevent OOM errors
NODE_OPTIONS: --max_old_space_size=3584
script:
......@@ -902,6 +900,7 @@ gitlab:assets:compile:
expire_in: 31d
paths:
- webpack-report/
- public/assets/
karma:
<<: *dedicated-no-docs-and-no-qa-pull-cache-job
......@@ -909,6 +908,9 @@ karma:
dependencies:
- compile-assets
- setup-test-env
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
......@@ -923,6 +925,8 @@ karma:
paths:
- chrome_debug.log
- coverage-javascript/
reports:
junit: junit_karma.xml
code_quality:
<<: *dedicated-no-docs-no-db-pull-cache-job
......@@ -1106,54 +1110,39 @@ no_ee_check:
only:
- //@gitlab-org/gitlab-ce
# GitLab EE Review apps
review-app-image:
<<: *single-script-job
stage: test
allow_failure: true