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

Just trigger building and integration tests instead of single tests

parent 03785b31
No related branches found
No related tags found
No related merge requests found
FROM debian:stretch
RUN apt-get update && \
apt-get install curl -y
...@@ -20,137 +20,54 @@ ...@@ -20,137 +20,54 @@
# #
# ** end header # ** end header
# #
stages:
- configure
- test
- setup
- clean
###########################
# configure
###########################
configure:mysql55:
stage: configure
tags: [ mysql55 ]
artifacts:
paths:
- .config.mysql55
script:
- printf "\n\n\n\n\n\n\n\n\n$MYSQL_USER_PASSWORD" > .user_input
- ./configure < .user_input
- test -f .config
- cp .config .config.mysql55
configure:mariadb10.1: variables:
stage: configure CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb-mysqlbackend-testenv:latest
tags: [ maria10.1 ] # When using dind service we need to instruct docker, to talk with the
artifacts: # daemon started inside of the service. The daemon is available with
paths: # a network connection instead of the default /var/run/docker.sock socket.
- .config.mariadb10.1 #
script: # The 'docker' hostname is the alias of the service container as described at
- printf "\n\n\n\n\ncaosdb-root\n\n\n\n$MYSQL_USER_PASSWORD" > .user_input # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
- ./configure < .user_input #
- test -f .config # Note that if you're using the Kubernetes executor, the variable should be set to
- cp .config .config.mariadb10.1 # 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
# test stages:
########################## - setup
- deploy
# test the connection
test:test-connection:mysql55:
stage: test
tags: [ mysql55 ]
dependencies:
- configure:mysql55
script:
- cp .config.mysql55 .config
- make test-connection
test:test-connection:mariadb10.1:
stage: test
tags: [ maria10.1 ]
dependencies:
- configure:mariadb10.1
script:
- cp .config.mariadb10.1 .config
- make test-connection
#########################
# setup
#########################
# install without patches and drop trigger_build:
setup:install:mysql55: stage: deploy
stage: setup script:
tags: [ mysql55 ] - /usr/bin/curl -X POST
dependencies: -F token=8f29e5eeb7db2123d9c2bb84634da2
- configure:mysql55 -F "variables[MYSQLBACKEND]=$CI_COMMIT_REF_NAME"
script: -F "variables[TriggerdBy]=MYSQLBACKEND"
- cp .config.mysql55 .config -F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
- export $(sed -n '/DATABASE_NAME/p ' .config)
- make _install
- make drop-$DATABASE_NAME
setup:install:mariadb10.1:
stage: setup
tags: [ maria10.1 ]
dependencies:
- configure:mariadb10.1
script:
- cp .config.mariadb10.1 .config
- export $(sed -n '/DATABASE_NAME/p ' .config)
- make _install
- make drop-$DATABASE_NAME
# upgrade database with patches and drop build-testenv:
setup:install_upgrade:mysql55: image: docker:latest
stage: setup
tags: [ mysql55 ]
dependencies:
- configure:mysql55
script:
- cp .config.mysql55 .config
- export $(sed -n '/DATABASE_NAME/p ' .config)
- make install
- make drop-$DATABASE_NAME
setup:install_upgrade:mariadb10.1:
stage: setup stage: setup
tags: [ maria10.1 ] script:
dependencies: - cd .docker
- configure:mariadb10.1 - docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script: # use here general latest or specific branch latest...
- cp .config.mariadb10.1 .config - docker pull $CI_REGISTRY_IMAGE || true
- export $(sed -n '/DATABASE_NAME/p ' .config) - docker build
- make install --pull
- make drop-$DATABASE_NAME --cache-from $CI_REGISTRY_IMAGE
-t $CI_REGISTRY_IMAGE .
############################### - docker push $CI_REGISTRY_IMAGE
# cleanup
###############################
# drop database
clean:drop:mysql55:
stage: clean
when: always
tags: [ mysql55 ]
dependencies:
- configure:mysql55
script:
- cp .config.mysql55 .config
- export $(sed -n '/DATABASE_NAME/p ' .config)
- if make _exists; then make drop-$DATABASE_NAME ; fi
clean:drop:mariadb10.1:
stage: clean
when: always
tags: [ maria10.1 ]
dependencies:
- configure:mariadb10.1
script:
- cp .config.mariadb10.1 .config
- export $(sed -n '/DATABASE_NAME/p ' .config)
- if make _exists; then make drop-$DATABASE_NAME ; fi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment