Commit acdb5296 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod CI: introspect path to python packages in HGitaly spawn

This *should* make it work for pipelines of tags and
release branches, that will install directly from PyPI.

Also, the spawn script adopts the call of `hg hpd-versions`,
avoiding hardcoded paths which were incorrect (but most of
our runners still have old directories laying around, so
this went under the radar). The same holds with the content
of `required.hgrc`.

--HG--
branch : heptapod-stable
parent ddefe30b3c6f
...@@ -121,8 +121,6 @@ rspec: ...@@ -121,8 +121,6 @@ rspec:
- run_timed_command "scripts/hgitaly-test-spawn" - run_timed_command "scripts/hgitaly-test-spawn"
- grep -A3 'hgrc:' config/gitlab.yml - grep -A3 'hgrc:' config/gitlab.yml
- cat $PWD/config/tests.hgrc - cat $PWD/config/tests.hgrc
- cat $PWD/hgitaly/py-heptapod/heptapod/required.hgrc
- HGRCPATH=hgitaly/py-heptapod/heptapod/required.hgrc /usr/local/bin/hg hpd-versions; echo
- scripts/heptapod_knapsack.sh - scripts/heptapod_knapsack.sh
......
...@@ -3,10 +3,17 @@ ...@@ -3,10 +3,17 @@
# This script is used only in CI # This script is used only in CI
set -eu set -eu
# CI base image has Mercurial, installed system-wide by pip3 (Python 3.8) # CI base image has Mercurial, installed system-wide by pip3.8
# We need the specific exact version, because even python3 is 3.5.
# as this can change, let's derive it from the hashbang.
HG=/usr/local/bin/hg HG=/usr/local/bin/hg
PY_HEPTAPOD_CLONE_PATH=hgitaly/py-heptapod INTERPRETER=$(head -1 $HG | cut -b 3-)
export HGRCPATH=config/tests.hgrc:${PY_HEPTAPOD_CLONE_PATH}/heptapod/required.hgrc HEPTAPOD_PKG_PATH=$($INTERPRETER -c 'import heptapod,os; print(os.path.dirname(heptapod.__file__))')
export HGRCPATH=config/tests.hgrc:${HEPTAPOD_PKG_PATH}/required.hgrc
echo "Calling hpd-versions"
$HG hpd-versions
echo
echo "Starting HGitaly server" echo "Starting HGitaly server"
set -x set -x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment