diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 235c4b87710de548e174cc0812a22458a9a8f79c..2f0700454b554cfb1996db3002b5db62199476dc 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -25,6 +25,7 @@ setup-test-env: - section_start "setup-test-env" "Setting up testing environment"; scripts/setup-test-env; section_end "setup-test-env"; - select_gitlab_workhorse_essentials - section_start "gitaly-test-build" "Compiling Gitaly binaries"; scripts/gitaly-test-build; section_end "gitaly-test-build"; # Do not use 'bundle exec' here + - strip_executable_binaries "${TMP_TEST_FOLDER}" artifacts: expire_in: 7d paths: diff --git a/scripts/gitlab_component_helpers.sh b/scripts/gitlab_component_helpers.sh index 98688d3864381ed62bd29d846e8eb09b3d51f43b..3d9f996e7c034ed916fd07dcca066a85042624ef 100644 --- a/scripts/gitlab_component_helpers.sh +++ b/scripts/gitlab_component_helpers.sh @@ -91,6 +91,12 @@ function select_gitlab_workhorse_essentials() { mv ${tmp_path} ${TMP_TEST_FOLDER} } +function strip_executable_binaries() { + local path="$1" + + find "$path" -executable -type f ! -size 0 -print0 | xargs -0 grep -IL . | xargs strip || true +} + # Assets functions function gitlab_assets_archive_doesnt_exist() { archive_doesnt_exist "${GITLAB_ASSETS_PACKAGE_URL}"