Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
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-server
Commits
9bf29260
Commit
9bf29260
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: whitepsace and comments
parent
564a3b49
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+42
-46
42 additions, 46 deletions
.gitlab-ci.yml
with
42 additions
and
46 deletions
.gitlab-ci.yml
+
42
−
46
View file @
9bf29260
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#
#
# Copyright (C) 2018 Research Group Biomedical Physics,
# Copyright (C) 2018 Research Group Biomedical Physics,
# Max-Planck-Institute for Dynamics and Self-Organization Göttingen
# Max-Planck-Institute for Dynamics and Self-Organization Göttingen
# Copyright (C) 2019 Henrik tom Wörden
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# it under the terms of the GNU Affero General Public License as
...
@@ -22,63 +23,58 @@
...
@@ -22,63 +23,58 @@
#
#
variables
:
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-server-testenv:latest
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-server-testenv:latest
# When using dind service we need to instruct docker, to talk with the
# With dind the docker deamon is available on the network
# daemon started inside of the service. The daemon is available with
DOCKER_HOST
:
tcp://docker:2375/
# a network connection instead of the default /var/run/docker.sock socket.
# When using dind, it's wise to use the overlayfs driver for
#
# improved performance.
# The 'docker' hostname is the alias of the service container as described at
DOCKER_DRIVER
:
overlay2
# 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
:
services
:
-
docker:dind
-
docker:dind
image
:
$CI_REGISTRY_IMAGE
image
:
$CI_REGISTRY_IMAGE
stages
:
stages
:
-
setup
-
setup
-
test
-
test
-
deploy
-
deploy
# run unit tests of the server
test
:
test
:
stage
:
test
tags
:
[
docker
]
script
:
stage
:
test
-
make easy-units
script
:
-
mvn dependency:purge-local-repository
-
make easy-units
-
mvn antlr4:antlr4
-
mvn dependency:purge-local-repository
-
mvn compile
-
mvn antlr4:antlr4
-
echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
-
mvn compile
-
mvn test
-
echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
-
mvn test
# Trigger building of server image and integration tests
trigger_build
:
trigger_build
:
tags
:
[
docker
]
stage
:
deploy
stage
:
deploy
script
:
script
:
-
/usr/bin/curl -X POST
-
/usr/bin/curl -X POST
-F token=8f29e5eeb7db2123d9c2bb84634da2
-F token=8f29e5eeb7db2123d9c2bb84634da2
-F "variables[SERVER]=$CI_COMMIT_REF_NAME"
-F "variables[SERVER]=$CI_COMMIT_REF_NAME"
-F "variables[TriggerdBy]=SERVER"
-F "variables[TriggerdBy]=SERVER"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
-F "variables[TriggerdByHash]=$CI_COMMIT_SHORT_SHA"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
# Build a docker image in which tests for this repository can run
build-testenv
:
build-testenv
:
image
:
docker:latest
tags
:
[
docker
]
stage
:
setup
image
:
docker:latest
script
:
stage
:
setup
-
cd src/test/docker
script
:
-
docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
cd src/test/docker
# use here general latest or specific branch latest...
-
docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $CI_REGISTRY_IMAGE ||
true
# use here general latest or specific branch latest...
-
docker build
-
docker pull $CI_REGISTRY_IMAGE ||
true
--pull
-
docker build
--cache-from $CI_REGISTRY_IMAGE
--pull
-t $CI_REGISTRY_IMAGE .
--cache-from $CI_REGISTRY_IMAGE
-
docker push $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