summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-09-19 17:44:44 +0000
committerIan Baum <ibaum@gitlab.com>2018-10-23 10:05:56 -0500
commitdef8e8dba687009ee87ac98f6dccf005e97f9960 (patch)
treecbf96cbcbaddfcc4c327538a1d200e06ab83c71a
parentba3e650006180634909cb7550383fa9ca94b73b4 (diff)
downloadgitlab-ce-def8e8dba687009ee87ac98f6dccf005e97f9960.tar.gz
Merge branch 'improve-review-apps' into 'master'
Improve review apps Closes #6875 See merge request gitlab-org/gitlab-ee!6665 [ci skip]
-rw-r--r--.gitlab-ci.yml81
1 files changed, 81 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b3593df8b13..a16938eb2ab 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -929,3 +929,84 @@ no_ee_check:
- scripts/no-ee-check
only:
- //@gitlab-org/gitlab-ce
+
+# GitLab CE Review apps
+review:
+ <<: *dedicated-no-docs-pull-cache-job
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
+ stage: test
+ allow_failure: true
+ before_script: []
+ variables:
+ GIT_DEPTH: "1"
+ HOST_SUFFIX: "$CI_ENVIRONMENT_SLUG"
+ DOMAIN: "-$CI_ENVIRONMENT_SLUG.$REVIEW_APPS_DOMAIN"
+ GITLAB_HELM_CHART_REF: "master"
+ script:
+ - export GITLAB_SHELL_VERSION=$(<GITLAB_SHELL_VERSION)
+ - export GITALY_VERSION=$(<GITALY_SERVER_VERSION)
+ - export GITLAB_WORKHORSE_VERSION=$(<GITLAB_WORKHORSE_VERSION)
+ - source ./scripts/review_apps/review-apps.sh
+ - BUILD_TRIGGER_TOKEN=$REVIEW_APPS_BUILD_TRIGGER_TOKEN ./scripts/trigger-build cng
+ - check_kube_domain
+ - download_gitlab_chart
+ - ensure_namespace
+ - install_tiller
+ - create_secret
+ - deploy
+ environment:
+ name: review/$CI_COMMIT_REF_NAME
+ url: https://gitlab-$CI_ENVIRONMENT_SLUG.$REVIEW_APPS_DOMAIN
+ on_stop: stop_review
+ only:
+ refs:
+ - branches@gitlab-org/gitlab-ce
+ kubernetes: active
+ except:
+ refs:
+ - master
+ - /(^docs[\/-].*|.*-docs$)/
+
+stop_review:
+ <<: *single-script-job
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
+ stage: post-cleanup
+ allow_failure: true
+ cache: {}
+ dependencies: []
+ before_script: []
+ script:
+ - source ./scripts/review_apps/review-apps.sh
+ - delete
+ - cleanup
+ when: manual
+ environment:
+ name: review/$CI_COMMIT_REF_NAME
+ action: stop
+ only:
+ refs:
+ - branches@gitlab-org/gitlab-ee
+ kubernetes: active
+ except:
+ - master
+ - /(^docs[\/-].*|.*-docs$)/
+
+automated_review_cleanup:
+ <<: *dedicated-no-docs-pull-cache-job
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
+ stage: build
+ allow_failure: true
+ cache: {}
+ dependencies: []
+ before_script:
+ - gem install gitlab --no-document
+ variables:
+ GIT_DEPTH: "1"
+ script:
+ - ruby -rrubygems scripts/review_apps/automated_cleanup.rb
+ only:
+ refs:
+ - schedules@gitlab-org/gitlab-ee
+ except:
+ - master
+ - /(^docs[\/-].*|.*-docs$)/