Skip to content
Snippets Groups Projects
Commit 77367b18 authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

CI/CD: adaptation for new base images

Notably, we are now using a virtualenv at `/opt/heptapod`
parent a4d8b226
No related branches found
No related tags found
1 merge request!121CI/CD: adaptation for new base images
......@@ -7,6 +7,8 @@
BASE_IMAGES_TAG: $CI_COMMIT_HG_BRANCH
BASE_IMAGES_COLLECTION: registry.heptapod.net:443/heptapod/ci-images
BASE_IMAGES_MERCURIAL: $BASE_IMAGES_COLLECTION/mercurial
HEPTAPOD_VENV: /opt/heptapod
PYTHON: $HEPTAPOD_VENV/bin/python
check-sdist:
stage: compat
......@@ -17,10 +19,11 @@
image: python:3.9
needs: []
script:
- pip3 install .
- python3 -c "import hgext3rd.heptapod; import heptapod"
- HGRCPATH=heptapod/required.hgrc hg hpd-versions
- python -m venv $HEPTAPOD_VENV
- $PYTHON -m pip install .
- $PYTHON -c "import hgext3rd.heptapod; import heptapod"
- HGRCPATH=heptapod/required.hgrc $HEPTAPOD_VENV/bin/hg hpd-versions
.tests:
script:
- ci/install-dependencies
......@@ -23,8 +26,9 @@
.tests:
script:
- ci/install-dependencies
- ./run-all-tests
- $PYTHON -m pip install -e .
- PATH=$HEPTAPOD_VENV/bin:$PATH ./run-all-tests
.tests-no-lint:
extends:
......
......@@ -7,6 +7,9 @@
set -u
HG_EXE=$HEPTAPOD_VENV/bin/hg
# putting aside any hg-git checkout in a vendor/ subdirectory in
# order to be really, really sure not to create side effects
# on builds that really don't want an intermediate hg-git version to be in
......@@ -21,7 +24,7 @@
if test -d "$HG_GIT_LOCAL_REPO"; then
echo "Updating the hg-git clone found at $HG_GIT_LOCAL_REPO to revision $HG_GIT_REVISION"
hg -R $HG_GIT_LOCAL_REPO pull -r $HG_GIT_REVISION $HG_GIT_REMOTE_REPO
hg -R $HG_GIT_LOCAL_REPO update -r $HG_GIT_REVISION
$HG_EXE -R $HG_GIT_LOCAL_REPO pull -r $HG_GIT_REVISION $HG_GIT_REMOTE_REPO
$HG_EXE -R $HG_GIT_LOCAL_REPO update -r $HG_GIT_REVISION
else
echo "Cloning hg-git to $HG_GIT_LOCAL_REPO at revision $HG_GIT_REVISION"
......@@ -26,5 +29,5 @@
else
echo "Cloning hg-git to $HG_GIT_LOCAL_REPO at revision $HG_GIT_REVISION"
hg clone -r $HG_GIT_REVISION $HG_GIT_REMOTE_REPO $HG_GIT_LOCAL_REPO
$HG_EXE clone -r $HG_GIT_REVISION $HG_GIT_REMOTE_REPO $HG_GIT_LOCAL_REPO
fi
echo "pip-installing $HG_GIT_LOCAL_REPO"
......@@ -29,9 +32,9 @@
fi
echo "pip-installing $HG_GIT_LOCAL_REPO"
pip3 install --user -e $HG_GIT_LOCAL_REPO
$PYTHON -m pip install -e $HG_GIT_LOCAL_REPO
fi
echo "pip-installing all missing requirements"
grep -Ev "Mercurial|hg-evolve" install-requirements.txt > ci-install.reqs
# everything should already be in place for most builds but we can still
# have some version changes between rebuilds of the base images
......@@ -32,10 +35,10 @@
fi
echo "pip-installing all missing requirements"
grep -Ev "Mercurial|hg-evolve" install-requirements.txt > ci-install.reqs
# everything should already be in place for most builds but we can still
# have some version changes between rebuilds of the base images
pip3 install --user -r ci-install.reqs --upgrade
pip3 install --user -r test-requirements.txt --upgrade
$PYTHON -m pip install -r ci-install.reqs --upgrade
$PYTHON -m pip install -r test-requirements.txt --upgrade
echo "Version of Mercurial and extensions"
......@@ -40,5 +43,5 @@
echo "Version of Mercurial and extensions"
HGRCPATH=ci/ext3rd.hgrc hg version --debug
HGRCPATH=ci/ext3rd.hgrc $HG_EXE version --debug
echo "Details of Mercurial installation"
......@@ -43,4 +46,4 @@
echo "Details of Mercurial installation"
hg debuginstall
$HG_EXE debuginstall
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment