Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
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 Python Integration Tests
Commits
681bac64
Verified
Commit
681bac64
authored
5 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' of gitlab.com:caosdb/caosdb-pyinttest into dev
parents
2b16394f
52e33a25
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
+2
-0
2 additions, 0 deletions
.docker/Dockerfile
.gitlab-ci.yml
+10
-45
10 additions, 45 deletions
.gitlab-ci.yml
with
12 additions
and
45 deletions
.docker/Dockerfile
+
2
−
0
View file @
681bac64
...
@@ -9,6 +9,8 @@ RUN apt-get update && \
...
@@ -9,6 +9,8 @@ RUN apt-get update && \
tox
\
tox
\
-y
-y
COPY
.docker/wait-for-it.sh /wait-for-it.sh
COPY
.docker/wait-for-it.sh /wait-for-it.sh
ADD
https://gitlab.com/api/v4/projects/13656973/repository/branches/dev \
pylib_version.json
RUN
git clone https://gitlab.com/caosdb/caosdb-pylib.git
&&
\
RUN
git clone https://gitlab.com/caosdb/caosdb-pylib.git
&&
\
cd
caosdb-pylib
&&
pip3
install
.
cd
caosdb-pylib
&&
pip3
install
.
COPY
. /git
COPY
. /git
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
10
−
45
View file @
681bac64
#
#
# ** header v3.0
# This file is a part of the CaosDB Project.
# This file is a part of the CaosDB Project.
#
#
# Copyright (C) 2018 Research Group Biomedical Physics,
# Copyright (C) 2018 Research Group Biomedical Physics,
...
@@ -18,47 +17,15 @@
...
@@ -18,47 +17,15 @@
#
#
# You should have received a copy of the GNU Affero General Public License
# 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/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** end header
#
#before_script:
# - apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
# - ruby -v
# - which ruby
# - gem install bundler --no-document
# - bundle install --jobs $(nproc) "${FLAGS[@]}"
#
#rspec:
# script:
# - bundle exec rspec
#
#rubocop:
# script:
# - bundle exec rubocop
#
variables
:
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-pyint-testenv
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-pyint-testenv
# 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
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
# improved performance.
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
services
:
services
:
-
docker:1
8
.0
9.7
-dind
-
docker:1
9
.0
3.0
-dind
stages
:
stages
:
-
setup
-
setup
...
@@ -113,17 +80,15 @@ stages:
...
@@ -113,17 +80,15 @@ stages:
# file-system features.
# file-system features.
#
#
test
:
test
:
tags
:
[
notls
]
tags
:
[
docker
]
stage
:
test
stage
:
test
image
:
image
:
registry.indiscale.com/caosdb-run-base
name
:
docker/compose:1.24.1
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
script
:
script
:
-
if [[ "$CAOSDB_TAG" == "" ]]; then
-
if [[ "$CAOSDB_TAG" == "" ]]; then
CAOSDB_TAG=dev-latest;
CAOSDB_TAG=dev-latest;
fi
fi
-
echo $CAOSDB_TAG
-
echo $CAOSDB_TAG
-
KNOWN_TAGS=$(curl -u testuser:$CI_REGISTRY_PASSWORD -X GET https://$CI_REGISTRY
:5000
/v2/caosdb/tags/list)
-
KNOWN_TAGS=$(curl -u testuser:$CI_REGISTRY_PASSWORD -X GET https://$CI_REGISTRY/v2/caosdb/tags/list)
-
echo $KNOWN_TAGS
-
echo $KNOWN_TAGS
# test if the caosdb registry knows our current tag
# test if the caosdb registry knows our current tag
-
echo $KNOWN_TAGS | grep "$CAOSDB_TAG"
-
echo $KNOWN_TAGS | grep "$CAOSDB_TAG"
...
@@ -135,10 +100,11 @@ test:
...
@@ -135,10 +100,11 @@ test:
# the pyinttest docker writes the return value of the tests into the
# the pyinttest docker writes the return value of the tests into the
# file result
# file result
-
/bin/sh ./run.sh
-
/bin/sh ./run.sh
-
cd ..
-
docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
-
docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
-
docker logs docker_sqldb_1 &> ../mariadb_log.txt
-
docker logs docker_sqldb_1 &> ../mariadb_log.txt
-
docker-compose down
-
docker-compose
-f .docker/docker-compose.yml
down
-
rc=`cat result`
-
rc=`cat
.docker/
result`
-
exit $rc
-
exit $rc
dependencies
:
[
cert
]
dependencies
:
[
cert
]
artifacts
:
artifacts
:
...
@@ -152,20 +118,19 @@ build-testenv:
...
@@ -152,20 +118,19 @@ build-testenv:
tags
:
[
notls
]
tags
:
[
notls
]
image
:
docker:18.09
image
:
docker:18.09
stage
:
setup
stage
:
setup
only
:
-
schedules
script
:
script
:
-
df -h
-
df -h
-
docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# use here general latest or specific branch latest...
# use here general latest or specific branch latest...
-
docker pull $CI_REGISTRY_IMAGE:latest ||
true
-
docker build
-
docker build
--pull
--file .docker/Dockerfile
--file .docker/Dockerfile
--cache-from $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:latest .
-t $CI_REGISTRY_IMAGE:latest .
-
docker push $CI_REGISTRY_IMAGE:latest
-
docker push $CI_REGISTRY_IMAGE:latest
cert
:
cert
:
tags
:
[
notls
]
tags
:
[
docker
]
stage
:
cert
stage
:
cert
image
:
$CI_REGISTRY_IMAGE:latest
image
:
$CI_REGISTRY_IMAGE:latest
artifacts
:
artifacts
:
...
...
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