Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
3dc74074
Commit
3dc74074
authored
5 years ago
by
Henrik tom Woerden
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.docker/Dockerfile
+3
-0
3 additions, 0 deletions
.docker/Dockerfile
.gitlab-ci.yml
+45
-128
45 additions, 128 deletions
.gitlab-ci.yml
with
48 additions
and
128 deletions
.docker/Dockerfile
0 → 100644
+
3
−
0
View file @
3dc74074
FROM
debian:stretch
RUN
apt-get update
&&
\
apt-get
install
curl
-y
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
45
−
128
View file @
3dc74074
...
...
@@ -20,137 +20,54 @@
#
# ** 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
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-mysqlbackend-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
##########################
# 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
#########################
image
:
$CI_REGISTRY_IMAGE
stages
:
-
setup
-
deploy
# 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
trigger_build
:
stage
:
deploy
script
:
-
/usr/bin/curl -X POST
-F token=8f29e5eeb7db2123d9c2bb84634da2
-F "variables[MYSQLBACKEND]=$CI_COMMIT_REF_NAME"
-F "variables[TriggerdBy]=MYSQLBACKEND"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
# 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
:
build-testenv
:
image
:
docker:latest
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
script
:
-
cd .docker
-
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
--pull
--cache-from $CI_REGISTRY_IMAGE
-t $CI_REGISTRY_IMAGE .
-
docker push $CI_REGISTRY_IMAGE
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment