summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2018-06-25 09:30:18 +0200
committerAchilleas Pipinellis <axil@gitlab.com>2018-06-25 09:42:33 +0200
commit61334983601b4d69c7893abd042e813204fdda7c (patch)
tree0470af86d48f9060c10a7c10e737f220753fcb71
parent2bac2918b2d6f12d94f739f4b6865b9e9221c642 (diff)
downloadgitlab-ce-docs/always-on-review-apps-for-docs.tar.gz
Always run review app for docs-only branchesdocs/always-on-review-apps-for-docs
-rw-r--r--.gitlab-ci.yml49
1 files changed, 34 insertions, 15 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 30c21b452e0..97551e60757 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -220,18 +220,6 @@ stages:
paths:
- log/development.log
-# Review docs base
-.review-docs: &review-docs
- <<: *dedicated-runner
- <<: *except-qa
- <<: *single-script-job
- variables:
- <<: *single-script-job-variables
- SCRIPT_NAME: trigger-build-docs
- when: manual
- only:
- - branches
-
# DB migration, rollback, and seed jobs
.db-migrate-reset: &db-migrate-reset
<<: *dedicated-no-docs-and-no-qa-pull-cache-job
@@ -273,9 +261,17 @@ package-and-qa:
- //@gitlab-org/gitlab-ce
- //@gitlab-org/gitlab-ee
-# Trigger a docs build in gitlab-docs
-# Useful to preview the docs changes live
-review-docs-deploy:
+# Review docs base
+.review-docs: &review-docs
+ <<: *dedicated-runner
+ <<: *single-script-job
+ variables:
+ <<: *single-script-job-variables
+ SCRIPT_NAME: trigger-build-docs
+
+# Trigger a manual docs build in gitlab-docs only on non docs-only branches.
+# Useful to preview the docs changes live.
+review-docs-deploy-manual:
<<: *review-docs
stage: build
environment:
@@ -287,6 +283,28 @@ review-docs-deploy:
script:
- gem install gitlab --no-ri --no-rdoc
- ./$SCRIPT_NAME deploy
+ when: manual
+ only:
+ - branches
+ <<: *except-docs-and-qa
+
+# Always trigger a docs build in gitlab-docs only on docs-only branches.
+# Useful to preview the docs changes live.
+review-docs-deploy:
+ <<: *review-docs
+ stage: post-test
+ environment:
+ name: review-docs/$CI_COMMIT_REF_NAME
+ # DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables
+ # Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693
+ url: http://$DOCS_GITLAB_REPO_SUFFIX-$CI_COMMIT_REF_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
+ on_stop: review-docs-cleanup
+ script:
+ - gem install gitlab --no-ri --no-rdoc
+ - ./$SCRIPT_NAME deploy
+ only:
+ - /(^docs[\/-].*|.*-docs$)/
+ <<: *except-qa
# Cleanup remote environment of gitlab-docs
review-docs-cleanup:
@@ -295,6 +313,7 @@ review-docs-cleanup:
environment:
name: review-docs/$CI_COMMIT_REF_NAME
action: stop
+ when: manual
script:
- gem install gitlab --no-ri --no-rdoc
- ./SCRIPT_NAME cleanup