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-11-08 15:06:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 15:06:32 +0300
commit61f0c58946ebac453b55a657cd4be1ac50a01e11 (patch)
tree7b164c1cc9dc8ab1d100ca4fe90decf6d72e984b /scripts
parentd23b2a0871f3ca507aafa949e0314625f1f0c6a7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/review_apps/review-apps.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/review_apps/review-apps.sh b/scripts/review_apps/review-apps.sh
index b405e992b63..0842f7871ee 100755
--- a/scripts/review_apps/review-apps.sh
+++ b/scripts/review_apps/review-apps.sh
@@ -207,19 +207,16 @@ function download_chart() {
}
function base_config_changed() {
- git fetch origin master --depth=50
+ if [ -z "${CI_MERGE_REQUEST_IID}" ]; then return; fi
- [ -n "$(git diff origin/master... --name-only -- scripts/review_apps/base-config.yaml)" ]
+ curl "${CI_API_V4_URL}/projects/${CI_MERGE_REQUEST_PROJECT_ID}/merge_requests/${CI_MERGE_REQUEST_IID}/changes" | jq '.changes | any(.old_path == "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
+ if [[ "$(base_config_changed)" == "true" ]]; 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