Skip to content

Commit e18af42

Browse files
committed
PYCBC-1775: Maybe unshallow repo in performer docker build
Motivation ========== On the CI workflow building the performer docker image, the git repo is shallow cloned with no tags or commit history. This means that couchbase_version.py is unable to determine the version of the SDK. Changes ======= In the performer Dockerfile, fetch the commit history & tags before building the SDK (git fetch --unshallow --tags) Change-Id: I58b520f41cfddb30f8705c8c6bbeb69d6f9c1d09 Reviewed-on: https://review.couchbase.org/c/couchbase-python-client/+/250810 Reviewed-by: Jared Casey <jared.casey@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
1 parent dab591e commit e18af42

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tools/fit_performer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ RUN if [ ! -f deps/couchbase-cxx-client/CMakeLists.txt ]; then \
2121
"the SDK build below will fail without it."; \
2222
fi
2323

24+
# CI checks out repo with no tags or commit history history, so unshallow the repo here.
25+
# This is to ensure couchbase_version.py is able to determine the version of the SDK.
26+
RUN if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then \
27+
echo "Shallow checkout detected, fetching history and tags..."; \
28+
git fetch --unshallow --tags --no-recurse-submodules origin; \
29+
else \
30+
echo "Full checkout detected, no need to fetch history or tags."; \
31+
fi;
32+
2433
RUN PYCBC_USE_CPM_CACHE=false pip install .
2534

2635
WORKDIR /app/tools/fit_performer

0 commit comments

Comments
 (0)