Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a0d15832
Commit
a0d15832
authored
Nov 07, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the Review App base-config.yml change detection
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
76dc18c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+0
-1
scripts/review_apps/review-apps.sh
scripts/review_apps/review-apps.sh
+3
-6
No files found.
.gitlab/ci/review.gitlab-ci.yml
View file @
a0d15832
...
...
@@ -117,7 +117,6 @@ 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
:
-
check_kube_domain
-
ensure_namespace
...
...
scripts/review_apps/review-apps.sh
View file @
a0d15832
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment