Commit 0d5a9b98 authored by Rémy Coutable's avatar Rémy Coutable

Use master scripts/review_apps/base-config.yaml to deploy Review Apps

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 9a4ca79b
......@@ -122,6 +122,7 @@ schedule:review-build-cng:
- source scripts/utils.sh
- install_api_client_dependencies_with_apk
- source scripts/review_apps/review-apps.sh
- export REVIEW_APP_CONFIG_CHANGED=$(base_config_changed)
script:
- date
- check_kube_domain
......
......@@ -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
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment