Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-30 18:14:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-30 18:14:17 +0300
commit3fe9588b1c1c4fb58f8ba8e9c27244fc2fc1c103 (patch)
treed19448d010ff9d58fed14846736ee358fb6b3327 /scripts/review_apps
parentad8eea383406037a207c80421e6e4bfa357f8044 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/review_apps')
-rwxr-xr-xscripts/review_apps/review-apps.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh
index 51768d07860..fbef3ebd231 100755
--- a/scripts/review_apps/review-apps.sh
+++ b/scripts/review_apps/review-apps.sh
@@ -195,9 +195,22 @@ function download_chart() {
helm dependency build .
}
+function base_config_changed() {
+ git fetch origin master --depth=50
+
+ [ -n "$(git diff origin/master... --name-only -- scripts/review_apps/base-config.yaml)" ]
+}
+
function deploy() {
local name="$CI_ENVIRONMENT_SLUG"
local edition="${GITLAB_EDITION-ce}"
+ local base_config_file_ref="master"
+ echo "REVIEW_APP_CONFIG_CHANGED: ${REVIEW_APP_CONFIG_CHANGED}"
+ if [ -n "${REVIEW_APP_CONFIG_CHANGED}" ]; then
+ base_config_file_ref="$CI_COMMIT_SHA"
+ fi
+ local base_config_file="https://gitlab.com/gitlab-org/gitlab/raw/${base_config_file_ref}/scripts/review_apps/base-config.yaml"
+
echoinfo "Deploying ${name}..." true
IMAGE_REPOSITORY="registry.gitlab.com/gitlab-org/build/cng-mirror"
@@ -240,11 +253,11 @@ EOF
)
HELM_CMD=$(cat << EOF
- $HELM_CMD \
+ ${HELM_CMD} \
--namespace="$KUBE_NAMESPACE" \
- --version="$CI_PIPELINE_ID-$CI_JOB_ID" \
- -f "../scripts/review_apps/base-config.yaml" \
- "$name" .
+ --version="${CI_PIPELINE_ID}-${CI_JOB_ID}" \
+ -f "${base_config_file}" \
+ "${name}" .
EOF
)