Skip to content
Snippets Groups Projects
Commit 37a18206 authored by Henrik tom Woerden's avatar Henrik tom Woerden
Browse files

Merge branch 'f-ci' into 'dev'

F ci

See merge request bmp-caosdb/caosdb-server!7
parents 9eadb436 f79cb48b
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
#
# ** end header
#
variables:
CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb-server-testenv:latest
# When using dind service we need to instruct docker, to talk with the
......@@ -46,66 +47,16 @@ services:
image: $CI_REGISTRY_IMAGE
stages:
- setup
- code-generation
- build
- test
- clean
- deploy
##########
# SETUP
##########
# delete local maven repo to be sure all packages are still maintained by the maven repos
setup:mvn:
tags: [ java10 ]
stage: setup
test:
stage: test
script:
- make easy-units
- mvn dependency:purge-local-repository
##################
# Code-generation
##################
# generate parsing classes with antlr
code-generation:antlr:
tags: [ java10 ]
stage: code-generation
artifacts:
paths:
- target/generated-sources/antlr4/
script:
- mvn antlr4:antlr4
#########
# Build
#########
# compile the server
build:server:
tags: [ java10 ]
stage: build
dependencies:
- code-generation:antlr
artifacts:
paths:
- target/classes/
script:
- mvn compile
########
# Test
########
# junit tests for the server
test:server:
tags: [ java10 ]
stage: test
dependencies:
- build:server
script:
- echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
- mvn test
......@@ -128,6 +79,7 @@ build-testenv:
# use here general latest or specific branch latest...
- docker pull $CI_REGISTRY_IMAGE || true
- docker build
--pull
--cache-from $CI_REGISTRY_IMAGE
-t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
FROM debian:latest
FROM debian:stretch
RUN apt-get update && \
apt-get install git make mariadb-server maven openjdk-8-jdk-headless \
python3-pip screen libpam0g-dev unzip -y
python3-pip screen libpam0g-dev unzip curl -y
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment