Skip to content
Snippets Groups Projects

ci: Build workhorse binaries and upload/download as generic package

All threads resolved!
Compare and Show latest version
3 files
+ 75
40
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -193,15 +193,13 @@ setup-test-env:
stage: prepare
variables:
SETUP_DB: "false"
TMP_TEST_GITLAB_WORKHOSE_FOLDER: "${TMP_TEST_FOLDER}/gitlab-workhorse"
script:
- workhorse_tree=$(git rev-parse HEAD:workhorse)
- workhorse_binaries_file="workhorse-${workhorse_tree}.tar.gz"
- 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/workhorse/${workhorse_tree}/${workhorse_binaries_file} || true'
- if [ -f "${workhorse_binaries_file}" ]; then
mkdir -p tmp/tests/gitlab-workhorse
tar -xzvf ${workhorse_binaries_file} -C tmp/tests
fi
- source scripts/gitlab_workhorse_component_helpers.sh
- run_timed_command "download_gitlab_workhorse_package" || true
- run_timed_command "extract_gitlab_workhorse_package" || true
- run_timed_command "scripts/setup-test-env"
- run_timed_command "filter_gitlab_workhorse_binaries"
- echo -e "\e[0Ksection_start:`date +%s`:gitaly-test-build[collapsed=true]\r\e[0KCompiling Gitaly binaries"
- run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here
- echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-build\r\e[0K"
@@ -209,28 +207,24 @@ setup-test-env:
expire_in: 7d
paths:
- config/secrets.yml
- tmp/tests/gitaly/_build/bin/
- tmp/tests/gitaly/_build/deps/git/install
- tmp/tests/gitaly/config.toml
- tmp/tests/gitaly/gitaly2.config.toml
- tmp/tests/gitaly/internal/
- tmp/tests/gitaly/internal_gitaly2/
- tmp/tests/gitaly/internal_sockets/
- tmp/tests/gitaly/Makefile
- tmp/tests/gitaly/praefect.config.toml
- tmp/tests/gitaly/ruby/
- tmp/tests/gitlab-elasticsearch-indexer/bin/gitlab-elasticsearch-indexer
- tmp/tests/gitlab-shell/
- tmp/tests/gitlab-test-fork/
- tmp/tests/gitlab-test-fork_bare/
- tmp/tests/gitlab-test/
- tmp/tests/gitlab-workhorse/gitlab-zip-metadata
- tmp/tests/gitlab-workhorse/gitlab-zip-cat
- tmp/tests/gitlab-workhorse/gitlab-workhorse
- tmp/tests/gitlab-workhorse/gitlab-resize-image
- tmp/tests/gitlab-workhorse/WORKHORSE_TREE
- tmp/tests/repositories/
- tmp/tests/second_storage/
- ${TMP_TEST_FOLDER}/gitaly/_build/bin/
- ${TMP_TEST_FOLDER}/gitaly/_build/deps/git/install
- ${TMP_TEST_FOLDER}/gitaly/config.toml
- ${TMP_TEST_FOLDER}/gitaly/gitaly2.config.toml
- ${TMP_TEST_FOLDER}/gitaly/internal/
- ${TMP_TEST_FOLDER}/gitaly/internal_gitaly2/
- ${TMP_TEST_FOLDER}/gitaly/internal_sockets/
- ${TMP_TEST_FOLDER}/gitaly/Makefile
- ${TMP_TEST_FOLDER}/gitaly/praefect.config.toml
- ${TMP_TEST_FOLDER}/gitaly/ruby/
- ${TMP_TEST_FOLDER}/gitlab-elasticsearch-indexer/bin/gitlab-elasticsearch-indexer
- ${TMP_TEST_FOLDER}/gitlab-shell/
- ${TMP_TEST_FOLDER}/gitlab-test-fork/
- ${TMP_TEST_FOLDER}/gitlab-test-fork_bare/
- ${TMP_TEST_FOLDER}/gitlab-test/
- ${TMP_TEST_FOLDER}/repositories/
- ${TMP_TEST_FOLDER}/second_storage/
- ${TMP_TEST_GITLAB_WORKHOSE_FOLDER}/
when: always
build-components:
@@ -238,21 +232,18 @@ build-components:
- setup-test-env
- .rails:rules:build-components
script:
- source scripts/gitlab_workhorse_component_helpers.sh
- run_timed_command "download_gitlab_workhorse_package" || true
# Early exit if the package already exists
- gitlab_workhorse_archive_doesnt_exist || exit 0
- run_timed_command "scripts/setup-test-env"
- workhorse_tree=$(git rev-parse HEAD:workhorse)
- workhorse_binaries_file="workhorse-${workhorse_tree}.tar.gz"
- echo $workhorse_tree $workhorse_binaries_file
- tar -czvf ${workhorse_binaries_file} gitlab-resize-image gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse WORKHORSE_TREE -C tmp/tests/gitlab-workhorse
- tar -tvf ${workhorse_binaries_file}
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ${PACKAGENAME}.${VERSION}.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${workhorse}/${workhorse_tree}/${workhorse_binaries_file}'
- run_timed_command "filter_gitlab_workhorse_binaries"
- run_timed_command "create_gitlab_workhorse_archive"
- run_timed_command "upload_gitlab_workhorse_package"
artifacts:
expire_in: 7d
paths:
- tmp/tests/gitlab-workhorse/gitlab-zip-metadata
- tmp/tests/gitlab-workhorse/gitlab-zip-cat
- tmp/tests/gitlab-workhorse/gitlab-workhorse
- tmp/tests/gitlab-workhorse/gitlab-resize-image
- tmp/tests/gitlab-workhorse/WORKHORSE_TREE
- ${TMP_TEST_GITLAB_WORKHOSE_FOLDER}/
update-setup-test-env-cache:
extends:
Loading