Skip to content
Snippets Groups Projects
Commit 929790ac authored by Timm Fitschen's avatar Timm Fitschen
Browse files

DEV: added .gitlab-ci.yml

parent 686fe963
No related branches found
Tags v2.0.30
No related merge requests found
# dot files # dot files
.* .*
!/.gitignore !/.gitignore
!/.gitlab-ci.yml
# dumps # dumps
*.dump.sql *.dump.sql
#
# ** header v3.0
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2018 Research Group Biomedical Physics,
# Max-Planck-Institute for Dynamics and Self-Organization Göttingen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** 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:
stage: configure
tags: [ maria10.1 ]
artifacts:
paths:
- .config.mariadb10.1
script:
- printf "\n\n\n\n\ncaosdb-root\n\n\n\n$MYSQL_USER_PASSWORD" > .user_input
- ./configure < .user_input
- test -f .config
- cp .config .config.mariadb10.1
##########################
# test
##########################
# 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
setup:install:mysql55:
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: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
setup:install_upgrade:mysql55:
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
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
###############################
# 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.
Finish editing this message first!
Please register or to comment