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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Python Integration Tests
Commits
943ed6c2
Commit
943ed6c2
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: added comments and minor clean up to .gitlab-ci.yml
parent
fad8cfaa
No related branches found
No related tags found
1 merge request
!33
MAINT: comments and minor clean up
Pipeline
#21403
failed
3 years ago
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-11
26 additions, 11 deletions
.gitlab-ci.yml
with
26 additions
and
11 deletions
.gitlab-ci.yml
+
26
−
11
View file @
943ed6c2
...
@@ -92,7 +92,6 @@ test:
...
@@ -92,7 +92,6 @@ test:
image
:
$CI_REGISTRY_IMAGE_BASE
image
:
$CI_REGISTRY_IMAGE_BASE
needs
:
[
"
cert"
]
needs
:
[
"
cert"
]
script
:
script
:
-
ls /
-
echo $F_BRANCH
-
echo $F_BRANCH
-
echo $CAOSDB_TAG
-
echo $CAOSDB_TAG
-
echo $CI_COMMIT_REF_NAME
-
echo $CI_COMMIT_REF_NAME
...
@@ -112,7 +111,6 @@ test:
...
@@ -112,7 +111,6 @@ test:
-
echo $CI_REGISTRY_IMAGE
-
echo $CI_REGISTRY_IMAGE
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
time docker load < /image-cache/caosdb-${F_BRANCH}.tar ||
true
-
if [[ "$CAOSDB_TAG" == "" ]]; then
-
if [[ "$CAOSDB_TAG" == "" ]]; then
if echo "$F_BRANCH" | grep -c "^f-" ; then
if echo "$F_BRANCH" | grep -c "^f-" ; then
CAOSDB_TAG=${DEPLOY_REF}_F_${F_BRANCH};
CAOSDB_TAG=${DEPLOY_REF}_F_${F_BRANCH};
...
@@ -121,30 +119,47 @@ test:
...
@@ -121,30 +119,47 @@ test:
CAOSDB_TAG=${DEPLOY_REF};
CAOSDB_TAG=${DEPLOY_REF};
fi;
fi;
fi
fi
-
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev ;
-
echo $CAOSDB_TAG
-
echo $CAOSDB_TAG
-
cd .docker
# Store mariadb version
-
MARIADBVERSION=$(grep mariadb docker-compose.yml | awk '{print $2}')
-
echo "mariadb image:"$MARIADBVERSION
-
time docker load < /image-cache/caosdb-pyint-testenv-${CI_COMMIT_REF_NAME}.tar ||
true
-
time docker load < /image-cache/caosdb-pyint-testenv-${CI_COMMIT_REF_NAME}.tar ||
true
-
time docker load < /image-cache/mariadb.tar ||
true
-
time docker load < /image-cache/caosdb-${F_BRANCH}.tar ||
true
-
time docker load < /image-cache/$MARIADBVERSION.tar ||
true
-
docker pull $CI_REGISTRY_IMAGE
-
docker pull $CI_REGISTRY_IMAGE
-
cd .docker
-
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev ;
# here the server and the mysql backend docker are being started
# Here, the server and the mysql backend docker are being started
-
CAOSDB_TAG=$CAOSDB_TAG docker-compose up -d
-
CAOSDB_TAG=$CAOSDB_TAG docker-compose up -d
# store versions of CaosDB parts
# Store versions of CaosDB parts
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_pylib_commit > hash_pylib
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_pylib_commit > hash_pylib
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_webui_commit > hash_webui
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_webui_commit > hash_webui
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_server_commit > hash_server
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_server_commit > hash_server
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_mysqlbackend_commit > hash_mysql
-
docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_mysqlbackend_commit > hash_mysql
# the pyinttest docker writes the return value of the tests into the
# file result
# Run the actual tests. This starts a new docker container within which
# the tests run. The return value is stored in .docker/result
-
/bin/sh ./run.sh
-
/bin/sh ./run.sh
# Save logs
-
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
-
cd ..
-
cd ..
# Stop the server
-
docker-compose -f .docker/docker-compose.yml down
-
docker-compose -f .docker/docker-compose.yml down
# Store mariadb image
-
if [ ! -f ".gistlab-ci.yml" ]; then
time docker save $MARIADBVERSION > /image-cache/$MARIADBVERSION.tar ||
true
fi
# the pyinttest docker writes the return value of the tests into the
# file result
-
rc=`cat .docker/result`
-
rc=`cat .docker/result`
-
echo mariadb:$(docker image ls mariadb | grep mariadb | awk '{print $2}')
-
docker save mariadb:$(docker image ls mariadb | grep mariadb | awk '{print $2}') > /image-cache/mariadb.tar ||
true
-
exit $rc
-
exit $rc
dependencies
:
[
cert
]
dependencies
:
[
cert
]
timeout
:
3h
timeout
:
3h
...
...
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