Commit 195391b2 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

heptapod-ci: installing HGitaly

We'll still need to run `hgitaly-serve` to write RSpec tests
relying on HGitaly, but at this point we should have all
dependencies to do so.

--HG--
branch : heptapod
parent 985a861e0e3d
......@@ -73,5 +73,5 @@ rspec:
- grep -A3 'hgrc:' config/gitlab.yml
- cat $PWD/config/tests.hgrc
- cat $PWD/vendor/py-heptapod/heptapod/required.hgrc
- HGRCPATH=vendor/py-heptapod/heptapod/required.hgrc /usr/local/bin/hg hpd-v
- HGRCPATH=vendor/py-heptapod/heptapod/required.hgrc /usr/local/bin/hg hpd-versions; echo
- scripts/heptapod_rspec.sh
......@@ -12,26 +12,32 @@ INTERPRETER = 'python3.8'
CWD = os.getcwd()
PY_HEPTAPOD_CLONE_PATH = os.path.join(CWD, 'vendor', 'py-heptapod')
HGITALY_CLONE_PATH = os.path.join(CWD, 'vendor', 'hgitaly')
HG_BIN = '/usr/local/bin/hg'
PIP_BIN = 'pip3.8'
# yes, Mercurial is readily available in GitLab base CI image!
# But its Debian 9 version (hg 4.0)
if os.path.exists(PY_HEPTAPOD_CLONE_PATH):
print("Updating py-heptapod clone at %s" % PY_HEPTAPOD_CLONE_PATH)
subprocess.check_call(('hg', '-R', PY_HEPTAPOD_CLONE_PATH, 'pull', '-u'))
else:
print("Cloning py-heptapod into %s" % PY_HEPTAPOD_CLONE_PATH)
subprocess.check_call(
('hg', 'clone', '-q',
'https://mirror.octobus.net/heptapod/py-heptapod',
PY_HEPTAPOD_CLONE_PATH,
))
pip_cmd = (PIP_BIN, 'install', '-e', PY_HEPTAPOD_CLONE_PATH)
print("Installing py-heptapod " + repr(pip_cmd))
subprocess.check_call(pip_cmd)
for slug, target in (('py-heptapod', PY_HEPTAPOD_CLONE_PATH),
('hgitaly', HGITALY_CLONE_PATH)):
if os.path.exists(target):
print("Updating %s clone at %s" % (slug, target))
subprocess.check_call(('hg', '-R', target, 'pull', '-u'))
else:
print("Cloning %s into %s" % (slug, target))
subprocess.check_call(
('hg', 'clone', '-q',
'https://mirror.octobus.net/heptapod/' + slug,
target,
))
print("Current revision for %s:" % target)
subprocess.check_call(('hg', '-R', target, 'log', '-r', '.'))
pip_cmd = (PIP_BIN, 'install', '-e', target)
print("Installing %s: %r" % (slug, pip_cmd))
subprocess.check_call(pip_cmd)
pip_logging_cmd = (PIP_BIN, 'install', 'hg-loggingmod')
print("Installing hg-loggingmod: " + repr(pip_logging_cmd))
......
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