summaryrefslogtreecommitdiff
path: root/scripts/utils.sh
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-24 18:17:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-24 18:17:30 +0000
commit0bf82aa5cb3b1ed826dd5c0d46331e17aa60d9e9 (patch)
treeee5a760877cce0189cc8e765a912a06942f3e4de /scripts/utils.sh
parentefbf661c4224d481c57d0346e26983a805e5ec93 (diff)
downloadgitlab-ce-0bf82aa5cb3b1ed826dd5c0d46331e17aa60d9e9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh35
1 files changed, 26 insertions, 9 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index 80057842c28..b41bc18deff 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -63,6 +63,19 @@ function test_url() {
fi
}
+function section_start () {
+ local section_title="${1}"
+ local section_description="${2:-$section_title}"
+
+ echo -e "section_start:`date +%s`:${section_title}[collapsed=true]\r\e[0K${section_description}"
+}
+
+function section_end () {
+ local section_title="${1}"
+
+ echo -e "section_end:`date +%s`:${section_title}\r\e[0K"
+}
+
function bundle_install_script() {
local extra_install_args="${1}"
@@ -72,7 +85,7 @@ function bundle_install_script() {
exit 1;
fi;
- echo -e "section_start:`date +%s`:bundle-install[collapsed=true]\r\e[0KInstalling gems"
+ section_start "bundle-install" "Installing gems"
gem --version
bundle --version
@@ -93,23 +106,23 @@ function bundle_install_script() {
run_timed_command "bundle pristine pg"
fi
- echo -e "section_end:`date +%s`:bundle-install\r\e[0K"
+ section_end "bundle-install"
}
function yarn_install_script() {
- echo -e "section_start:`date +%s`:yarn-install[collapsed=true]\r\e[0KInstalling Yarn packages"
+ section_start "yarn-install" "Installing Yarn packages"
retry yarn install --frozen-lockfile
- echo -e "section_end:`date +%s`:yarn-install\r\e[0K"
+ section_end "yarn-install"
}
function assets_compile_script() {
- echo -e "section_start:`date +%s`:assets-compile[collapsed=true]\r\e[0KCompiling frontend assets"
+ section_start "assets-compile" "Compiling frontend assets"
bin/rake gitlab:assets:compile
- echo -e "section_end:`date +%s`:assets-compile\r\e[0K"
+ section_end "assets-compile"
}
function setup_db_user_only() {
@@ -121,9 +134,13 @@ function setup_db_praefect() {
}
function setup_db() {
- run_timed_command "setup_db_user_only"
+ section_start "setup-db" "Setting up DBs"
+
+ setup_db_user_only
run_timed_command_with_metric "bundle exec rake db:drop db:create db:schema:load db:migrate gitlab:db:lock_writes" "setup_db"
- run_timed_command "setup_db_praefect"
+ setup_db_praefect
+
+ section_end "setup-db"
}
function install_gitlab_gem() {
@@ -136,7 +153,7 @@ function install_tff_gem() {
}
function install_activesupport_gem() {
- run_timed_command "gem install activesupport --no-document --version 6.1.7.1"
+ run_timed_command "gem install activesupport --no-document --version 6.1.7.2"
}
function install_junit_merge_gem() {