Skip to content
Snippets Groups Projects
Commit 9eadb436 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

ci

parent f574fd3b
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,30 @@
#
# ** 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
# daemon started inside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
#
# Note that if you're using the Kubernetes executor, the variable should be set to
# tcp://localhost:2375/ because of how the Kubernetes executor connects services
# to the job container
# DOCKER_HOST: tcp://localhost:2375/
#
# For non-Kubernetes executors, we use tcp://docker:2375/
DOCKER_HOST: tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:dind
image: $CI_REGISTRY_IMAGE
stages:
- setup
- code-generation
......@@ -85,23 +109,25 @@ test:server:
- echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
- mvn test
###########
# Clean
###########
clean:mvn:
tags: [ java10 ]
stage: clean
when: always
dependencies: []
script:
- mvn clean
trigger_build:
stage: deploy
script:
- /usr/bin/curl -X POST
-F token=8f29e5eeb7db2123d9c2bb84634da2
-F "variables[TRIGGER_REPO]=$CI_PROJECT_NAME"
-F "variables[TRIGGER_BRANCH]=$CI_COMMIT_REF_NAME"
-F "variables[SERVER]=$CI_COMMIT_REF_NAME"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
build-testenv:
image: docker:latest
stage: setup
script:
- cd src/test/docker
- echo $CI_REGISTRY_PASSWORD
- echo $CI_REGISTRY
- docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# use here general latest or specific branch latest...
- docker pull $CI_REGISTRY_IMAGE || true
- docker build
--cache-from $CI_REGISTRY_IMAGE
-t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
FROM debian:latest
RUN apt-get update && \
apt-get install git make mariadb-server maven openjdk-8-jdk-headless \
python3-pip screen libpam0g-dev unzip -y
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment