diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61c08429c96..f7ec0591086 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,9 +40,11 @@ stages: - test - post-test - pages + - post-cleanup # Predefined scopes .dedicated-runner: &dedicated-runner + retry: 1 tags: - gitlab-org @@ -152,8 +154,7 @@ stages: - master@gitlab/gitlabhq - master@gitlab/gitlab-ee -# Trigger a package build on omnibus-gitlab repository - +# Trigger a package build in omnibus-gitlab repository build-package: image: ruby:2.3-alpine before_script: [] @@ -165,11 +166,47 @@ build-package: cache: {} when: manual script: - - scripts/trigger-build + - scripts/trigger-build-omnibus only: - //@gitlab-org/gitlab-ce - //@gitlab-org/gitlab-ee +# Review docs base +.review-docs: &review-docs + image: ruby:2.4-alpine + before_script: [] + services: [] + variables: + SETUP_DB: "false" + USE_BUNDLE_INSTALL: "false" + cache: {} + when: manual + only: + - branches + +# Trigger a docs build in gitlab-docs +# Useful to preview the docs changes live +review-docs-deploy: + <<: *review-docs + stage: build + environment: + name: review-docs/$CI_COMMIT_REF_NAME + on_stop: review-docs-cleanup + script: + - gem install gitlab --no-doc + - scripts/trigger-build-docs deploy + +# Cleanup remote environment of gitlab-docs +review-docs-cleanup: + <<: *review-docs + stage: post-cleanup + environment: + name: review-docs/$CI_COMMIT_REF_NAME + action: stop + script: + - gem install gitlab --no-doc + - scripts/trigger-build-docs cleanup + # Retrieve knapsack and rspec_flaky reports retrieve-tests-metadata: <<: *tests-metadata-state @@ -246,7 +283,6 @@ setup-test-env: script: - node --version - yarn install --frozen-lockfile --cache-folder .yarn-cache - - bundle exec rake gettext:po_to_json - bundle exec rake gitlab:assets:compile - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - scripts/gitaly-test-build # Do not use 'bundle exec' here @@ -411,8 +447,8 @@ db:migrate:reset-mysql: .migration-paths: &migration-paths <<: *dedicated-runner - <<: *only-canonical-masters <<: *pull-cache + <<: *except-docs stage: test variables: SETUP_DB: "false" @@ -495,7 +531,6 @@ gitlab:assets:compile: NO_COMPRESSION: "true" script: - yarn install --frozen-lockfile --production --cache-folder .yarn-cache - - bundle exec rake gettext:po_to_json - bundle exec rake gitlab:assets:compile artifacts: name: webpack-report |