Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Oct 16, 2019
1 parent 00c78fb commit 8e45d25
Show file tree
Hide file tree
Showing 135 changed files with 4,051 additions and 407 deletions.
1 change: 0 additions & 1 deletion .gitattributes
@@ -1,3 +1,2 @@
VERSION merge=ours
Dangerfile gitlab-language=ruby
db/schema.rb merge=merge_db_schema
15 changes: 15 additions & 0 deletions .gitlab/ci/docs.gitlab-ci.yml
Expand Up @@ -67,3 +67,18 @@ docs lint:
- bundle exec nanoc check internal_links
# Check the internal anchor links
- bundle exec nanoc check internal_anchors

graphql-docs-verify:
extends:
- .default-tags
- .default-retry
- .default-cache
- .default-only
- .default-before_script
- .only-graphql-changes
variables:
SETUP_DB: "false"
stage: test
needs: ["setup-test-env"]
script:
- bundle exec rake gitlab:graphql:check_docs
36 changes: 25 additions & 11 deletions .gitlab/ci/frontend.gitlab-ci.yml
Expand Up @@ -53,7 +53,7 @@
- gitlab-org
- docker

gitlab:assets:compile:
gitlab:assets:compile pull-push-cache:
extends: .gitlab:assets:compile-metadata
only:
refs:
Expand All @@ -63,9 +63,6 @@ gitlab:assets:compile:

gitlab:assets:compile pull-cache:
extends: .gitlab:assets:compile-metadata
except:
refs:
- master
cache:
policy: pull

Expand All @@ -89,28 +86,40 @@ gitlab:assets:compile pull-cache:
# 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"
key: "assets-compile:v7"
artifacts:
expire_in: 7d
paths:
- node_modules
- public/assets

compile-assets:
compile-assets pull-push-cache:
extends: .compile-assets-metadata
only:
refs:
- master
cache:
policy: pull-push

compile-assets pull-cache:
extends: .compile-assets-metadata
except:
compile-assets pull-push-cache foss:
extends: [".compile-assets-metadata", ".only-ee-as-if-foss"]
only:
refs:
- master
cache:
policy: pull-push
key: "assets-compile:v7:foss"

compile-assets pull-cache:
extends: .compile-assets-metadata
cache:
policy: pull

compile-assets pull-cache foss:
extends: [".compile-assets-metadata", ".only-ee-as-if-foss"]
cache:
policy: pull
key: "assets-compile:v7:foss"

.only-code-frontend-job-base:
extends:
Expand All @@ -121,7 +130,9 @@ compile-assets pull-cache:
- .default-before_script
- .only-code-changes
- .use-pg9
dependencies: ["compile-assets", "compile-assets pull-cache", "setup-test-env"]
stage: test
needs: ["setup-test-env", "compile-assets pull-cache"]
dependencies: ["setup-test-env", "compile-assets pull-cache"]

.karma-base:
extends: .only-code-frontend-job-base
Expand Down Expand Up @@ -195,6 +206,7 @@ jest-foss:
- .default-cache
- .default-only
- .only-code-changes
stage: test
dependencies: []
cache:
key: "$CI_JOB_NAME"
Expand Down Expand Up @@ -227,7 +239,9 @@ webpack-dev-server:
- .default-cache
- .default-only
- .only-code-changes
dependencies: ["setup-test-env", "compile-assets", "compile-assets pull-cache"]
stage: test
needs: ["setup-test-env", "compile-assets pull-cache"]
dependencies: ["setup-test-env", "compile-assets pull-cache"]
variables:
WEBPACK_MEMORY_TEST: "true"
script:
Expand Down
8 changes: 7 additions & 1 deletion .gitlab/ci/global.gitlab-ci.yml
Expand Up @@ -71,6 +71,12 @@
- "doc/**/*"
- ".markdownlint.json"

.only-graphql-changes:
only:
changes:
- "{,ee/}app/graphql/**/*"
- "{,ee/}lib/gitlab/graphql/**/*"

.only-code-qa-changes:
only:
changes:
Expand Down Expand Up @@ -153,4 +159,4 @@
.only-ee-as-if-foss:
extends: .only-ee
variables:
IS_GITLAB_EE: '0'
FOSS_ONLY: '1'
2 changes: 1 addition & 1 deletion .gitlab/ci/pages.gitlab-ci.yml
Expand Up @@ -11,7 +11,7 @@ pages:
variables:
- $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
stage: pages
dependencies: ["coverage", "karma", "gitlab:assets:compile"]
dependencies: ["coverage", "karma", "gitlab:assets:compile pull-cache"]
script:
- mv public/ .public/
- mkdir public/
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/qa.gitlab-ci.yml
Expand Up @@ -71,4 +71,4 @@ schedule:package-and-qa:
- .package-and-qa-base
- .only-code-qa-changes
- .only-canonical-schedules
needs: ["build-qa-image", "gitlab:assets:compile"]
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
25 changes: 16 additions & 9 deletions .gitlab/ci/rails.gitlab-ci.yml
Expand Up @@ -53,6 +53,8 @@ setup-test-env:
.rspec-base:
extends: .only-code-rails-job-base
stage: test
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-assets pull-cache"]
dependencies: ["setup-test-env", "retrieve-tests-metadata", "compile-assets pull-cache"]
script:
- source scripts/rspec_helpers.sh
- rspec_paralellized_job "--tag ~quarantine --tag ~geo"
Expand All @@ -69,16 +71,20 @@ setup-test-env:
reports:
junit: junit_rspec.xml

.rspec-base-foss:
extends: [".rspec-base", ".only-ee-as-if-foss"]
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-assets pull-cache foss"]
dependencies: ["setup-test-env", "retrieve-tests-metadata", "compile-assets pull-cache foss"]

.rspec-base-pg9:
extends:
- .rspec-base
- .use-pg9

.rspec-base-pg9-foss:
extends:
- .rspec-base
- .rspec-base-foss
- .use-pg9
- .only-ee-as-if-foss

.rspec-base-pg10:
extends:
Expand Down Expand Up @@ -106,10 +112,9 @@ rspec system pg9:
extends: .rspec-base-pg9
parallel: 24

# TODO: This requires FOSS assets
# rspec system pg9-foss:
# extends: .rspec-base-pg9-foss
# parallel: 24
rspec system pg9-foss:
extends: .rspec-base-pg9-foss
parallel: 24

rspec unit pg10:
extends: .rspec-base-pg10
Expand Down Expand Up @@ -229,7 +234,9 @@ rspec fast_spec_helper:

static-analysis:
extends: .only-code-qa-rails-job-base
dependencies: ["setup-test-env", "compile-assets", "compile-assets pull-cache"]
stage: test
needs: ["setup-test-env", "compile-assets pull-cache"]
dependencies: ["setup-test-env", "compile-assets pull-cache"]
variables:
SETUP_DB: "false"
script:
Expand All @@ -252,16 +259,16 @@ downtime_check:
variables:
- $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
dependencies: ["setup-test-env"]

.db-job-base:
extends:
- .only-code-rails-job-base
- .use-pg9
stage: test
dependencies: ["setup-test-env"]
needs: ["setup-test-env"]
dependencies: ["setup-test-env"]

# DB migration, rollback, and seed jobs
db:migrate:reset:
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/review.gitlab-ci.yml
Expand Up @@ -81,7 +81,7 @@ schedule:review-build-cng:
extends:
- .review-build-cng-base
- .only-review-schedules
needs: ["gitlab:assets:compile"]
needs: ["gitlab:assets:compile pull-cache"]

.review-deploy-base:
extends:
Expand All @@ -97,7 +97,7 @@ schedule:review-build-cng:
variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
GITLAB_HELM_CHART_REF: "master"
GITLAB_HELM_CHART_REF: "v2.3.7"
GITLAB_EDITION: "ce"
environment:
name: review/${CI_COMMIT_REF_NAME}
Expand Down
17 changes: 17 additions & 0 deletions app/assets/javascripts/api.js
Expand Up @@ -36,6 +36,7 @@ const Api = {
branchSinglePath: '/api/:version/projects/:id/repository/branches/:branch',
createBranchPath: '/api/:version/projects/:id/repository/branches',
releasesPath: '/api/:version/projects/:id/releases',
releasePath: '/api/:version/projects/:id/releases/:tag_name',
mergeRequestsPipeline: '/api/:version/projects/:id/merge_requests/:merge_request_iid/pipelines',
adminStatisticsPath: 'api/:version/application/statistics',

Expand Down Expand Up @@ -391,6 +392,22 @@ const Api = {
return axios.get(url);
},

release(projectPath, tagName) {
const url = Api.buildUrl(this.releasePath)
.replace(':id', encodeURIComponent(projectPath))
.replace(':tag_name', encodeURIComponent(tagName));

return axios.get(url);
},

updateRelease(projectPath, tagName, release) {
const url = Api.buildUrl(this.releasePath)
.replace(':id', encodeURIComponent(projectPath))
.replace(':tag_name', encodeURIComponent(tagName));

return axios.put(url, release);
},

adminStatistics() {
const url = Api.buildUrl(this.adminStatisticsPath);
return axios.get(url);
Expand Down
7 changes: 7 additions & 0 deletions app/assets/javascripts/pages/projects/releases/edit/index.js
@@ -0,0 +1,7 @@
import ZenMode from '~/zen_mode';
import initEditRelease from '~/releases/detail';

document.addEventListener('DOMContentLoaded', () => {
new ZenMode(); // eslint-disable-line no-new
initEditRelease();
});

0 comments on commit 8e45d25

Please sign in to comment.