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
4f7c039e
Verified
Commit
4f7c039e
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
Cherry-pick .gitlab-ci.yml from dev
parent
5b429b7c
No related branches found
No related tags found
No related merge requests found
Pipeline
#19506
passed
3 years ago
Stage: info
Stage: cert
Stage: style
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+40
-37
40 additions, 37 deletions
.gitlab-ci.yml
with
40 additions
and
37 deletions
.gitlab-ci.yml
+
40
−
37
View file @
4f7c039e
...
...
@@ -23,6 +23,7 @@ variables:
CI_REGISTRY_IMAGE_BASE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/base:latest
stages
:
-
info
-
setup
-
cert
-
style
...
...
@@ -78,10 +79,44 @@ stages:
# file-system features.
#
.env
:
&env
-
echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)"
-
echo "CI_REGISTRY_IMAGE_BASE = $CI_REGISTRY_IMAGE_BASE"
-
echo "CI_REGISTRY_IMAGE = $CI_REGISTRY_IMAGE"
-
echo "CAOSDB_TAG = $CAOSDB_TAG"
-
echo "REFTAG = $REFTAG"
-
echo "F_BRANCH = $F_BRANCH"
-
echo "CI_COMMIT_REF_NAME = $CI_COMMIT_REF_NAME"
-
ls -lah /image-cache/
-
F_BRANCH=${F_BRANCH:-$CI_COMMIT_REF_NAME}
-
echo $F_BRANCH
-
if [[ "$REFTAG" == "" ]] ; then
if [[ "$F_BRANCH" == "dev" ]] ; then
REFTAG=dev;
fi;
fi
-
REFTAG=${REFTAG:-dev_F_${F_BRANCH}}
-
echo $F_BRANCH
-
if [[ "$CAOSDB_TAG" == "" ]]; then
CAOSDB_TAG=${REFTAG};
fi
-
echo $CAOSDB_TAG
info
:
tags
:
[
cached-dind
]
image
:
docker:20.10
stage
:
info
needs
:
[]
script
:
-
*env
test
:
tags
:
[
docker
]
services
:
-
docker:20.10
.3
-dind
-
docker:20.10-dind
variables
:
# This is a workaround for the gitlab-runner health check mechanism when
# using docker-dind service. The runner will otherwise guess the port
...
...
@@ -91,42 +126,10 @@ test:
image
:
$CI_REGISTRY_IMAGE_BASE
needs
:
[
"
cert"
]
script
:
-
ls /
-
echo $F_BRANCH
-
echo $CAOSDB_TAG
-
echo $CI_COMMIT_REF_NAME
-
F_BRANCH=${F_BRANCH:-$CI_COMMIT_REF_NAME}
-
echo $F_BRANCH
-
echo $CAOSDB_TAG
-
echo $CI_COMMIT_REF_NAME
-
if echo "$F_BRANCH" | grep -c "^f-.*$"; then
REFTAG="${REFTAG}_F_${F_BRANCH}";
elif [ "$F_BRANCH" == "main" ]; then
F_BRANCH=main;
else
F_BRANCH=dev;
fi
-
echo $F_BRANCH
-
echo $CI_COMMIT_REF_NAME
-
echo $CI_REGISTRY_IMAGE
-
*env
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
-
time docker load < /image-cache/caosdb-${F_BRANCH}.tar ||
true
-
DEPLOY_REF=dev
-
if [[ "$CI_COMMIT_REF_NAME" == "main" ]] ; then
DEPLOY_REF=main;
fi
-
echo $DEPLOY_REF
-
if [[ "$CAOSDB_TAG" == "" ]]; then
if echo "$F_BRANCH" | grep -c "^f-" ; then
CAOSDB_TAG=${DEPLOY_REF}_F_${F_BRANCH};
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=${DEPLOY_REF} ;
else
CAOSDB_TAG=${DEPLOY_REF};
fi;
fi
-
echo $CAOSDB_TAG
-
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev ;
-
time docker load < /image-cache/caosdb-${REFTAG}.tar || time docker load < /image-cache/caosdb-dev.tar ||
true
-
docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev
-
echo $CAOSDB_TAG
-
time docker load < /image-cache/caosdb-pyint-testenv-${CI_COMMIT_REF_NAME}.tar ||
true
...
...
@@ -169,7 +172,7 @@ test:
build-testenv
:
tags
:
[
cached-dind
]
image
:
docker:
19.03
image
:
docker:
20.10
stage
:
setup
timeout
:
2h
only
:
...
...
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