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
9eadb436
Commit
9eadb436
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
ci
parent
f574fd3b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+39
-13
39 additions, 13 deletions
.gitlab-ci.yml
src/test/docker/Dockerfile
+4
-0
4 additions, 0 deletions
src/test/docker/Dockerfile
with
43 additions
and
13 deletions
.gitlab-ci.yml
+
39
−
13
View file @
9eadb436
...
@@ -20,6 +20,30 @@
...
@@ -20,6 +20,30 @@
#
#
# ** end header
# ** 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
:
stages
:
-
setup
-
setup
-
code-generation
-
code-generation
...
@@ -85,23 +109,25 @@ test:server:
...
@@ -85,23 +109,25 @@ test:server:
-
echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
-
echo "defaultRealm = CaosDB" > conf/ext/usersources.ini
-
mvn test
-
mvn test
###########
# Clean
###########
clean:mvn
:
tags
:
[
java10
]
stage
:
clean
when
:
always
dependencies
:
[]
script
:
-
mvn clean
trigger_build
:
trigger_build
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
/usr/bin/curl -X POST
-
/usr/bin/curl -X POST
-F token=8f29e5eeb7db2123d9c2bb84634da2
-F token=8f29e5eeb7db2123d9c2bb84634da2
-F "variables[TRIGGER_REPO]=$CI_PROJECT_NAME"
-F "variables[SERVER]=$CI_COMMIT_REF_NAME"
-F "variables[TRIGGER_BRANCH]=$CI_COMMIT_REF_NAME"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
-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
This diff is collapsed.
Click to expand it.
src/test/docker/Dockerfile
0 → 100644
+
4
−
0
View file @
9eadb436
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
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