OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Reduce verbosity of CI
Cyril Rohr846cb7623567
diff --git a/docker-compose.ci.yml b/docker-compose.ci.ymlindex 06f994dab6e..5d236e3d8d1 100644--- a/docker-compose.ci.yml+++ b/docker-compose.ci.yml@@ -10,7 +10,7 @@ services:dockerfile: Dockerfileenvironment:RSPEC_RETRY_RETRY_COUNT: "${CI_RETRY_COUNT:-3}"- CI_JOBS: "${CI_JOBS:-8}"+ CI_JOBS: "${CI_JOBS}"CAPYBARA_AWS_ACCESS_KEY_ID: "${CAPYBARA_AWS_ACCESS_KEY_ID}"CAPYBARA_AWS_SECRET_ACCESS_KEY: "${CAPYBARA_AWS_SECRET_ACCESS_KEY}"tmpfs:diff --git a/docker/ci/entrypoint.sh b/docker/ci/entrypoint.shindex ba2e8eb39e8..ecd81a2406f 100755--- a/docker/ci/entrypoint.sh+++ b/docker/ci/entrypoint.sh@@ -1,5 +1,5 @@#!/bin/bash-#set -e+set -eexport PGBIN="/usr/lib/postgresql/$PGVERSION/bin"export JOBS="${CI_JOBS:=$(nproc)}"@@ -31,6 +31,8 @@ fiexecute() {+ echo "[execute] $@"+ local ret=0if [ $(id -u) -eq 0 ]; thensu $USER -c "$@"else@@ -38,8 +40,19 @@ execute() {fi}+execute_quiet() {+ local ret=0+ echo "[execute_quiet] $@"+ if ! execute "$@" >/tmp/op-output.log ; then+ ret=$?+ cat /tmp/op-output.log+ fi+ return $ret+}+cleanup() {rm -rf tmp/cache/parallel*+ rm -f /tmp/op-output.log[ -d tmp/features ] && mv tmp/features spec/}@@ -49,42 +62,42 @@ if [ "$1" == "setup-tests" ]; thenecho "Preparing environment for running tests..."shift- execute "mkdir -p tmp"- execute "cp docker/ci/database.yml config/"+ execute_quiet "mkdir -p tmp"+ execute_quiet "cp docker/ci/database.yml config/"for i in $(seq 0 $JOBS); dofolder="$CAPYBARA_DOWNLOADED_FILE_DIR/$i"- echo "Creating folder $folder..."- rm -rf "$folder"- mkdir -p "$folder"- chmod 1777 "$folder"+ execute_quiet "rm -rf '$folder' ; mkdir -p '$folder' ; chmod 1777 '$folder'"done- execute "time bundle install -j$JOBS"+ execute_quiet "time bundle install -j$JOBS --quiet"# create test database "app" and dump schema- execute "time bundle exec rails db:create db:migrate db:schema:dump webdrivers:chromedriver:update webdrivers:geckodriver:update openproject:plugins:register_frontend"+ execute_quiet "time bundle exec rails db:create db:migrate db:schema:dump webdrivers:chromedriver:update webdrivers:geckodriver:update openproject:plugins:register_frontend"# create parallel test databases "app#n" and load schema- execute "time bundle exec rails parallel:create parallel:load_schema"+ execute_quiet "time bundle exec rails parallel:create parallel:load_schema"# setup frontend deps- execute "cd frontend && npm install"+ execute_quiet "cd frontend && npm install"fiif [ "$1" == "run-units" ]; thenshift- execute "cp -f /cache/turbo_runtime_units.log spec/support/"- execute "time bundle exec rails zeitwerk:check"- execute "mv spec/features tmp/"+ execute_quiet "cp -f /cache/turbo_runtime_units.log spec/support/"+ # turbo_tests cannot yet exclude specific directories, so copying spec/features elsewhere (temporarily)+ execute_quiet "mv spec/features tmp/"+ execute_quiet "time bundle exec rails zeitwerk:check"execute "time bundle exec turbo_tests -n $JOBS --runtime-log spec/support/turbo_runtime_units.log spec"- execute "cp -f spec/support/turbo_runtime_units.log /cache/"+ execute_quiet "cp -f spec/support/turbo_runtime_units.log /cache/"+ cleanupfiif [ "$1" == "run-features" ]; thenshift- execute "cp -f /cache/turbo_runtime_features.log spec/support/"- execute "time bundle exec rails assets:precompile"- execute "cp -rp config/frontend_assets.manifest.json public/assets/frontend_assets.manifest.json"+ execute_quiet "cp -f /cache/turbo_runtime_features.log spec/support/"+ execute_quiet "time bundle exec rails assets:precompile"+ execute_quiet "cp -rp config/frontend_assets.manifest.json public/assets/frontend_assets.manifest.json"execute "time bundle exec turbo_tests -n $JOBS --runtime-log spec/support/turbo_runtime_features.log spec/features"- execute "cp -f spec/support/turbo_runtime_features.log /cache/"+ execute_quiet "cp -f spec/support/turbo_runtime_features.log /cache/"+ cleanupfiif [ ! -z "$1" ] ; then