Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cppinttest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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-cppinttest
Commits
95331344
Verified
Commit
95331344
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
PIPELINE
parent
44718b20
No related branches found
No related tags found
1 merge request
!25
F octave logging
Pipeline
#25402
failed
3 years ago
Stage: info
Stage: setup
Stage: build
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+34
-34
34 additions, 34 deletions
.gitlab-ci.yml
with
34 additions
and
34 deletions
.gitlab-ci.yml
+
34
−
34
View file @
95331344
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
variables
:
variables
:
# this is the image where cpplib repo is present (artifact from pipeline in
# this is the image where cpplib repo is present (artifact from pipeline in
# caosdb-cpplib)
# caosdb-cpplib)
CPPLIB_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-cpplib/testenv
:$CI_COMMIT_REF_NAME
CPPLIB_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-cpplib/testenv
# this is the image where all the docker containers (server, mysql and test
# this is the image where all the docker containers (server, mysql and test
# suite) are started
# suite) are started
CI_REGISTRY_IMAGE_BASE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/base:latest
CI_REGISTRY_IMAGE_BASE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/base:latest
...
@@ -48,27 +48,28 @@ stages:
...
@@ -48,27 +48,28 @@ stages:
-
build
-
build
-
test
-
test
info
:
.env
:
&env
tags
:
[
cached-dind
]
image
:
docker:20.10
stage
:
info
needs
:
[]
script
:
-
echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)"
-
echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)"
-
echo "CPPLIB_REGISTRY_IMAGE = $CPPLIB_REGISTRY_IMAGE"
-
echo "CPPLIB_REGISTRY_IMAGE = $CPPLIB_REGISTRY_IMAGE"
-
echo "CI_REGISTRY_IMAGE_BASE = $CI_REGISTRY_IMAGE_BASE"
-
echo "CI_REGISTRY_IMAGE_BASE = $CI_REGISTRY_IMAGE_BASE"
-
echo "CPPINTTEST_REGISTRY_IMAGE = $CPPINTTEST_REGISTRY_IMAGE"
-
echo "CPPINTTEST_REGISTRY_IMAGE = $CPPINTTEST_REGISTRY_IMAGE"
-
echo "CPPINTTEST_IMAGE_CACHE = $CPPINTTEST_IMAGE_CACHE"
-
echo "CPPINTTEST_IMAGE_CACHE = $CPPINTTEST_IMAGE_CACHE"
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
echo "REFTAG = $REFTAG"
-
echo "F_BRANCH = $F_BRANCH"
-
echo "F_BRANCH = $F_BRANCH"
-
ls -lah /image-cache/
info
:
tags
:
[
cached-dind
]
image
:
docker:20.10
stage
:
info
needs
:
[]
script
:
-
*env
# Build a docker image in which tests for this repository can run
# Build a docker image in which tests for this repository can run
build-testenv
:
&build-testenv
build-testenv
:
&build-testenv
tags
:
[
cached-dind
]
tags
:
[
cached-dind
]
image
:
docker:20.10
.6
image
:
docker:20.10
stage
:
setup
stage
:
setup
timeout
:
2h
timeout
:
2h
needs
:
[]
needs
:
[]
...
@@ -77,12 +78,14 @@ build-testenv: &build-testenv
...
@@ -77,12 +78,14 @@ build-testenv: &build-testenv
-
schedules
-
schedules
-
web
-
web
script
:
script
:
-
*env
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
#build testenv image
#build testenv image
-
docker pull $CPPLIB_REGISTRY_IMAGE ||
true
# remove??? docker build --pull???
-
TESTENV_TAG=$F_BRANCH
-
docker pull $CPPLIB_REGISTRY_IMAGE:$TESTENV_TAG || TESTENV_TAG=dev
-
docker build
-
docker build
--build-arg CPPLIB_REGISTRY_IMAGE=$CPPLIB_REGISTRY_IMAGE
--build-arg CPPLIB_REGISTRY_IMAGE=$CPPLIB_REGISTRY_IMAGE
:$TESTENV_TAG
--file .docker/Dockerfile
--file .docker/Dockerfile
--pull
--pull
--cache-from $CPPINTTEST_REGISTRY_IMAGE
--cache-from $CPPINTTEST_REGISTRY_IMAGE
...
@@ -108,7 +111,7 @@ build-test:
...
@@ -108,7 +111,7 @@ build-test:
test
:
test
:
tags
:
[
docker
]
tags
:
[
docker
]
services
:
services
:
-
docker:20.10
.3
-dind
-
docker:20.10-dind
variables
:
variables
:
# This is a workaround for the gitlab-runner health check mechanism when
# This is a workaround for the gitlab-runner health check mechanism when
# using docker-dind service. The runner will otherwise guess the port
# using docker-dind service. The runner will otherwise guess the port
...
@@ -121,15 +124,13 @@ test:
...
@@ -121,15 +124,13 @@ test:
artifacts
:
true
artifacts
:
true
-
job
:
build-test
-
job
:
build-test
script
:
script
:
-
echo $PWD
-
*env
-
F_BRANCH="${F_BRANCH:-$CI_COMMIT_REF_NAME}" ;
-
echo "F_BRANCH = $F_BRANCH"
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
echo "DEPLOY_REF = $DEPLOY_REF"
-
ls -la
-
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-${CAOSDB_TAG}.tar || time docker load < /image-cache/caosdb-dev.tar ||
true
-
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev
-
F_BRANCH=${F_BRANCH:-$CI_COMMIT_REF_NAME}
-
echo "F_BRANCH = $F_BRANCH"
-
if [ -z "$CAOSDB_TAG" ]; then
-
if [ -z "$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};
...
@@ -142,28 +143,28 @@ test:
...
@@ -142,28 +143,28 @@ test:
CAOSDB_TAG="${DEFAULT_CAOSDB_TAG}" ;
CAOSDB_TAG="${DEFAULT_CAOSDB_TAG}" ;
fi;
fi;
fi
fi
-
echo "F_BRANCH = $F_BRANCH"
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
echo "DEPLOY_REF = $DEPLOY_REF"
-
docker load < /image-cache/caosdb-${F_BRANCH}.tar ||
true
-
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG="${DEFAULT_CAOSDB_TAG}" ;
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
docker load < /image-cache/${CPPINTTEST_IMAGE_CACHE} ||
true
-
docker load < /image-cache/${CPPINTTEST_IMAGE_CACHE} ||
true
-
docker pull $CPPINTTEST_REGISTRY_IMAGE
-
docker pull $CPPINTTEST_REGISTRY_IMAGE
-
docker load < /image-cache/mariadb.tar ||
true
-
docker load < /image-cache/mariadb.tar ||
true
# load any(!!!) mariab image
-
cd .docker
-
cd .docker
-
ls -la
-
ls -la cert
# 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_server_commit | tee hash_server
-
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_mysqlbackend_commit | tee hash_mysql
-
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_proto_commit | tee hash_proto
-
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_proto_commit > hash_proto
-
cat hash_server
-
cat hash_proto
-
cat hash_mysql
-
cat hash_webui
-
cat hash_pylib
# 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
...
@@ -179,7 +180,6 @@ test:
...
@@ -179,7 +180,6 @@ test:
# collect results
# collect results
-
rc=`cat result`
-
rc=`cat result`
# renew mariadb image in the cache (why? to renew the timestamp???)
-
echo mariadb:$(docker image ls mariadb | grep mariadb | awk '{print $2}')
-
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
-
docker save mariadb:$(docker image ls mariadb | grep mariadb | awk '{print $2}') > /image-cache/mariadb.tar ||
true
...
...
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