Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-03-04 12:53:49 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-03-28 10:03:04 +0300
commit3a7ee9f8386ff772aa7a602c346b9032c9eb25a9 (patch)
tree24e10f38ff5f0be90260aaa87740cfa90a3ec556
parent85d5fa4f7eb86c44b902de4331cead040b773a64 (diff)
ci: Convert jobs to test bundled Git by default
We only have a single CI job right now which tests bundled Git. This Git execution environment has become our default though, and consequentially we should also have most of our CI jobs use it. Convert jobs to use bundled Git by default.
-rw-r--r--.gitlab-ci.yml16
1 files changed, 5 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3239dd7af..020985f7d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -111,8 +111,8 @@ build:
policy: pull-push
script:
- go version
- - make all git $(pwd)/_build/tools/protoc
- - _support/test-boot .
+ - make build $(pwd)/_build/tools/protoc $(test "${GIT_VERSION}" = "default" && echo "build-bundled-git" || echo "git")
+ - _support/test-boot . ${TEST_BOOT_ARGS}
parallel:
matrix:
# These definitions are for the non-default Git versions.
@@ -121,6 +121,7 @@ build:
# These definitions are for the default Git version where we want to
# apply our default set of Git patches.
- GO_VERSION: [ "1.16", "1.17" ]
+ TEST_BOOT_ARGS: "--bundled-git"
build:binaries:
stage: build
@@ -147,17 +148,12 @@ build:binaries:
test:
<<: *test_definition
script:
- # If we're testing with bundled Git, then we don't want to have the Git
- # installation around. Otherwise, Git would be able to resolve its binaries
- # by just looking at its own GIT_PREFIX and then pick binaries from that
- # installation directory.
- - if test -n "${WITH_BUNDLED_GIT}"; then rm -rf _build/deps/git/install; fi
# We need to prepare test dependencies as privileged user.
- - make build prepare-tests
+ - make build prepare-tests $(test "${GIT_VERSION}" = default && echo WITH_BUNDLED_GIT=YesPlease)
# But the actual tests should run unprivileged. This assures that we pay
# proper attention to permission bits and that we don't modify the source
# directory.
- - setpriv --reuid=9999 --regid=9999 --clear-groups --no-new-privs env HOME=/dev/null make ${TARGET} SKIP_RSPEC_BUILD=YesPlease
+ - setpriv --reuid=9999 --regid=9999 --clear-groups --no-new-privs env HOME=/dev/null make ${TARGET} SKIP_RSPEC_BUILD=YesPlease $(test "${GIT_VERSION}" = default && echo WITH_BUNDLED_GIT=YesPlease)
parallel:
matrix:
# These definitions are for the non-default Git versions.
@@ -169,8 +165,6 @@ test:
- GO_VERSION: [ "1.16", "1.17" ]
TARGET: test
- TARGET: [ test-with-proxies, test-with-praefect, race-go ]
- - WITH_BUNDLED_GIT: "with-bundled-git"
- TARGET: test
# Execute tests with our minimum required Postgres version, as well. If
# the minimum version changes, please change this to the new minimum
# version. Furthermore, please make sure to update the minimum required