Commit 2c0b0c9c authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Heptapod CI: jobs for the native mode

It's time to get rolling.
parent d4983b683fe9
......@@ -61,6 +61,13 @@ docker-inside:
- log/hgserve/mercurial.log
- log/hgserve/gunicorn.log
.hg-native:
variables:
# avoid any trouble with boolean interpretation but that means that
# only this exact spelling will work
HEPTAPOD_HG_NATIVE: "yes"
allow_failure: true # we're just getting started
docker-remote-0:
variables:
PYTEST_SHARD_ID: 0
......@@ -89,5 +96,39 @@ docker-remote-1:
- .docker-remote
- .rules:test-heptapod
docker-native-inside:
extends:
- docker-inside
- .hg-native
docker-native-remote-0:
variables:
PYTEST_SHARD_ID: 0
services:
# unfortunately variables are not expanded in service aliases
# so we need to duplicate
- name: octobus/heptapod:$TARGET_HEPTAPOD_IMAGE
alias: heptapod-native-0
- name: selenium/standalone-chrome
alias: selenium-0
extends:
- .docker-remote
- .rules:test-heptapod
- .hg-native
docker-native-remote-1:
variables:
PYTEST_SHARD_ID: 1
services:
# unfortunately variables are not expanded in service aliases
# so we need to duplicate
- name: octobus/heptapod:$TARGET_HEPTAPOD_IMAGE
alias: heptapod-native-1
- name: selenium/standalone-chrome
alias: selenium-native-1
extends:
- .docker-remote
- .rules:test-heptapod
- .hg-native
......@@ -2,8 +2,16 @@
set -e
grep heptapod /etc/hosts
HEPTAPOD_SERVICE_IP=`getent ahostsv4 heptapod-$PYTEST_SHARD_ID | grep STREAM | cut -f 1 -d ' '`
if [ "$HEPTAPOD_HG_NATIVE" = "yes" ]; then
COMMON_FLAGS="${COMMONFLAGS} --heptapod-hg-native"
HEPTAPOD_SERVICE=heptapod-native
SELENIUM_SERVICE=selenium-native
else
HEPTAPOD_SERVICE=heptapod
SELENIUM_SERVICE=selenium
fi
HEPTAPOD_SERVICE_IP=`getent ahostsv4 ${HEPTAPOD_SERVICE}-$PYTEST_SHARD_ID | grep STREAM | cut -f 1 -d ' '`
echo "HEPTAPOD IP address is $HEPTAPOD_SERVICE_IP"
......@@ -13,7 +21,11 @@ COMMON_FLAGS="-v \
--heptapod-url http://$HEPTAPOD_SERVICE_IP \
--heptapod-ssh-port 22 \
--heptapod-remote \
--heptapod-webdriver-remote-url http://selenium-$PYTEST_SHARD_ID:4444/wd/hub"
--heptapod-webdriver-remote-url http://${SELENIUM_SERVICE}-${PYTEST_SHARD_ID}:4444/wd/hub"
if [ "$HEPTAPOD_HG_NATIVE" = "yes" ]; then
COMMON_FLAGS="${COMMON_FLAGS} --heptapod-hg-native"
fi
if tox -- $COMMON_FLAGS --heptapod-wait-after-first-response 180; then
echo "First pass succeeded"
......
......@@ -16,6 +16,11 @@ COMMON_FLAGS="-v \
--heptapod-hg-client-executable=/opt/gitlab/embedded/bin/hg \
--heptapod-omnibus"
if [ "$HEPTAPOD_HG_NATIVE" = "yes" ]; then
COMMON_FLAGS="${COMMON_FLAGS} --heptapod-hg-native"
fi
chown -R git:git .
GIT_HOME=`ls -d ~git` # for explicit guaranteed forwarding
chown git:git $GIT_HOME
......
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