Skip to content
Snippets Groups Projects
Commit dac6cf88 authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-951: Consolidate tox environments to lower compile time load

parent 246652ad
No related branches found
No related tags found
1 merge request!423L2SS-951: Disable site-packages and install pytango in tox
......@@ -42,23 +42,34 @@ stages:
- . bootstrap/etc/lofar20rc.sh || true
## Allow docker image script to execute
# - chmod u+x $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh
# Template for docker images NOT on tagged or master builds
.base_docker_images_except:
extends: .base_docker_images
except:
refs:
- tags
- master
# Template to download all remote images and store them on our image registry
# (call tag_and_push without arguments)
.base_docker_store_images:
extends: .base_docker_images
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh
# Download all remote images and store them on our image registry for tagged
# master builds
docker_store_images_master_tag:
extends: .base_docker_store_images
only:
refs:
- tags
- master
# Download all remote images and store them on our image registry if .env changes
# on a merge request
docker_store_images_changes:
extends: .base_docker_store_images
# This will spawn as detached pipeline but atleast ensures the changes rule
......@@ -70,6 +81,8 @@ docker_store_images_changes:
- merge_requests
changes:
- docker-compose/.env
# Build and push all our custom images on tagged or master builds
docker_build_image_all:
extends: .base_docker_images
only:
......@@ -114,30 +127,32 @@ docker_build_image_all:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh archiver-timescale latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh hdbppts-cm latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh hdbppts-es latest
docker_build_image_elk:
# Build and push custom images on merge request if relevant files changed
docker_build_image_lofar_device_base:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/elk.yml
- docker-compose/elk/*
- docker-compose/elk-configure-host/*
- docker-compose/lofar-device-base.yml
- docker-compose/lofar-device-base/*
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh elk $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh elk-configure-host $tag
docker_build_image_lofar_device_base:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh lofar-device-base $tag
docker_build_image_elk:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/lofar-device-base.yml
- docker-compose/lofar-device-base/*
- docker-compose/elk.yml
- docker-compose/elk/*
- docker-compose/elk-configure-host/*
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh lofar-device-base $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh elk $tag
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh elk-configure-host $tag
docker_build_image_prometheus:
extends: .base_docker_images_except
only:
......
......@@ -6,8 +6,7 @@ ARG DEBIAN_FRONTEND=noninteractive
ARG DEBCONF_NONINTERACTIVE_SEEN=true
RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
RUN sudo apt-get update && sudo apt-get install -y git g++ gcc shellcheck graphviz python3-dev libboost-python-dev libtango-dev pkg-config && sudo apt-get clean
RUN sudo apt-get update && sudo apt-get install -y git g++ gcc shellcheck graphviz python3-dev libboost-python-dev pkg-config && sudo apt-get clean
COPY lofar-device-base/lofar-requirements.txt /lofar-requirements.txt
RUN sudo pip3 install -r /lofar-requirements.txt
......
[tox]
minversion = 3.20
envlist = py37,py38,py39,py310,pep8
envlist = py3{7,8,9,10},pep8
skipsdist = True
[testenv]
......@@ -20,6 +20,7 @@ passenv = HOME
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
envdir = {toxworkdir}/testenv
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
......@@ -31,6 +32,18 @@ commands =
{envpython} -m stestr --version
{envpython} -m stestr run {posargs}
[testenv:py37]
envdir = {toxworkdir}/testenvpy37
[testenv:py38]
envdir = {toxworkdir}/testenvpy38
[testenv:py39]
envdir = {toxworkdir}/testenvpy39
[testenv:py310]
envdir = {toxworkdir}/testenvpy310
[testenv:integration]
; Warning running integration tests will make changes to your docker system!
; These tests should only be run by the integration-test docker container.
......@@ -56,10 +69,6 @@ commands =
setenv =
VIRTUAL_ENV={envdir}
PYTHON={envpython} -m coverage run --source tangostationcontrol --parallel-mode
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
{envpython} -m stestr --version
{envpython} -m coverage --version
......@@ -93,6 +102,7 @@ commands =
{envpython} -m xenon tangostationcontrol -b B -m A -a A -i libhdbpp-python
[testenv:docs]
envdir = {toxworkdir}/docs
deps =
-r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
-r{toxinidir}/docs/docs-requirements.txt
......
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