summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2017-09-21 16:19:24 +0200
committerAchilleas Pipinellis <axil@gitlab.com>2017-09-22 11:57:23 +0200
commit32bf5f074c7255f4065b2504a194ce5934440302 (patch)
tree2584f24038aad457a389ca21a2d6fb8719cc1b91 /.gitlab-ci.yml
parentfc805edf904ec712769fd2806c4154efba83b45d (diff)
downloadgitlab-ce-32bf5f074c7255f4065b2504a194ce5934440302.tar.gz
Do not clone the repo when running the review-docs jobs
Previously, we checked out the branch and ran the script from there. However, when the MR got merged and the cleanup job was run it would fail since it could not find the now deleted branch. This commit rather downloads the script from GitLab and skips downloading the artifacts/dependencies/cache to speed up the process.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml15
1 files changed, 12 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3c224c8440f..c62845adc58 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -183,11 +183,20 @@ build-package:
image: ruby:2.4-alpine
before_script:
- gem install gitlab --no-doc
+ # We need to download the script rather than clone the repo since the
+ # review-docs-cleanup job will not be able to run when the branch gets
+ # deleted (when merging the MR).
+ - apk add --update openssl
+ - wget https://gitlab.com/gitlab-org/gitlab-ce/raw/master/scripts/trigger-build-docs
+ - chmod 755 trigger-build-docs
services: []
+ cache: {}
+ dependencies: []
+ artifacts: {}
variables:
SETUP_DB: "false"
USE_BUNDLE_INSTALL: "false"
- cache: {}
+ GIT_STRATEGY: none
when: manual
only:
- branches
@@ -204,7 +213,7 @@ review-docs-deploy:
url: http://preview-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
on_stop: review-docs-cleanup
script:
- - scripts/trigger-build-docs deploy
+ - ./trigger-build-docs deploy
# Cleanup remote environment of gitlab-docs
review-docs-cleanup:
@@ -214,7 +223,7 @@ review-docs-cleanup:
name: review-docs/$CI_COMMIT_REF_NAME
action: stop
script:
- - scripts/trigger-build-docs cleanup
+ - ./trigger-build-docs cleanup
# Retrieve knapsack and rspec_flaky reports
retrieve-tests-metadata: