diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 12:06:32 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 12:06:32 +0000 |
commit | 61f0c58946ebac453b55a657cd4be1ac50a01e11 (patch) | |
tree | 7b164c1cc9dc8ab1d100ca4fe90decf6d72e984b /scripts/review_apps | |
parent | d23b2a0871f3ca507aafa949e0314625f1f0c6a7 (diff) | |
download | gitlab-ce-61f0c58946ebac453b55a657cd4be1ac50a01e11.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/review_apps')
-rwxr-xr-x | scripts/review_apps/review-apps.sh | 9 |
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 |