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

L2SS-259: Add build stage for building docker images

parent 41ff8e80
No related branches found
No related tags found
1 merge request!58L2SS-259: Integrate unit tests using Continuous Integration (CI)
...@@ -7,13 +7,32 @@ cache: ...@@ -7,13 +7,32 @@ cache:
paths: paths:
- .cache/pip - .cache/pip
- devices/.tox - devices/.tox
.before_script_template: &before_unit_test
before_script:
- sudo apt-get update
- sudo apt-get install -y git
stages: stages:
- building
- linting - linting
- unit-tests - unit-tests
building:
stage: building
image: docker/compose:latest
variables:
CHECKOUT_DIR: "$CI_PROJECT_DIR/../"
TANGO_SKA_LOCAL_DIR: "${CHECKOUT_DIR}"
TANGO_SKA_CONTAINER_DIR: "/opt/lofar2.0/ska-docker/"
TANGO_SKA_CONTAINER_MOUNT: "${TANGO_SKA_LOCAL_DIR}:${TANGO_SKA_CONTAINER_DIR_DIR}:ro"
TANGO_LOFAR_LOCAL_DIR: "${CHECKOUT_DIR}/tango/"
TANGO_LOFAR_CONTAINER_DIR: "/opt/lofar2.0/tango/"
TANGO_LOFAR_CONTAINER_MOUNT: "${TANGO_LOFAR_LOCAL_DIR}:${TANGO_LOFAR_CONTAINER_DIR}:rw"
TANGO_CONTAINER_ENV: "-e TANGO_SKA_CONTAINER_DIR=${TANGO_SKA_CONTAINER_DIR} -e TANGO_LOFAR_CONTAINER_DIR=${TANGO_LOFAR_CONTAINER_DIR}"
NETWORK_MODE: "lofar"
before_script:
- sudo apt-get update
- sudo apt-get install -y git make
- touch ~/.Xauthority
script:
- cd docker-compose
- make pull
- make minimal
- make build
linting: linting:
stage: linting stage: linting
allow_failure: true allow_failure: true
...@@ -22,7 +41,9 @@ linting: ...@@ -22,7 +41,9 @@ linting:
- tox -e pep8 - tox -e pep8
unit_test: unit_test:
stage: unit-tests stage: unit-tests
<<: *before_unit_test before_script:
- sudo apt-get update
- sudo apt-get install -y git
script: script:
- cd devices - cd devices
- tox -e py37 - tox -e py37
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