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
c648388d
Commit
c648388d
authored
3 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
STY DOC: Reordered .gitlab-ci.yml, fixed documentation a bit.
parent
b35b950a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+79
-74
79 additions, 74 deletions
.gitlab-ci.yml
with
79 additions
and
74 deletions
.gitlab-ci.yml
+
79
−
74
View file @
c648388d
...
...
@@ -18,23 +18,10 @@
# 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/>.
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/testenv:latest
CI_REGISTRY_IMAGE_BASE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/base:latest
DEPLOY_REF
:
dev
stages
:
-
setup
-
cert
-
style
-
test
-
deploy
# During the test stage the CI pipeline (which runs in a "root" docker) starts
# two docker containers with docker-compose (one for the caosdb-server, another
# for the mysql-backend). Then a third docker is being started which contains
# the pyintest suite and executes it.
# During the test stage the CI pipeline (which runs in a "root" docker) starts two docker containers
# with docker-compose (one for the caosdb-server, another for the mysql-backend). Then a third
# docker is started which contains the pyintest suite and runs the integration tests.
#
# +-------------(root docker)-------------------------+
# | |
...
...
@@ -44,8 +31,8 @@ stages:
# | +-(caosdb-server)-------------------+ |
# | | | |
# | | /opt/caosdb | |
# | .------->| + /git/caosdb-server/
scripting
/ | |
# | | .----->| + /git/caosdb-server/
authtoken
/ | |
# | .------->| + /git/caosdb-server/
authtoken
/ | |
# | | .----->| + /git/caosdb-server/
scripting
/ | |
# | | | .--->| + /mnt/extroot | |
# | | | | .->| + /cert | |
# | | | | | | | |
...
...
@@ -79,6 +66,79 @@ stages:
# file-system features.
#
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/testenv:latest
CI_REGISTRY_IMAGE_BASE
:
$CI_REGISTRY/caosdb/src/caosdb-pyinttest/base:latest
DEPLOY_REF
:
dev
stages
:
-
setup
-
cert
-
style
-
test
-
deploy
build-testenv
:
tags
:
[
cached-dind
]
image
:
docker:19.03
stage
:
setup
timeout
:
2h
only
:
-
schedules
-
web
-
pushes
needs
:
[]
script
:
-
df -h
-
command -v wget
-
if [ -z "$PYLIB" ]; then
if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
echo "Check if pylib has branch $CI_COMMIT_REF_NAME" ;
if wget https://gitlab.com/api/v4/projects/13656973/repository/branches/${CI_COMMIT_REF_NAME} ; then
PYLIB=$CI_COMMIT_REF_NAME ;
fi;
fi;
fi;
-
PYLIB=${PYLIB:-dev}
-
echo $PYLIB
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# use here general latest or specific branch latest...
-
docker build
--build-arg PYLIB=${PYLIB}
--file .docker/Dockerfile
-t $CI_REGISTRY_IMAGE .
-
docker push $CI_REGISTRY_IMAGE
-
docker save $CI_REGISTRY_IMAGE > /image-cache/caosdb-pyint-testenv-${CI_COMMIT_REF_NAME}.tar
-
cd .docker-base
-
docker build
-t $CI_REGISTRY_IMAGE_BASE .
-
docker push $CI_REGISTRY_IMAGE_BASE
cert
:
tags
:
[
docker
]
stage
:
cert
image
:
$CI_REGISTRY_IMAGE
artifacts
:
paths
:
-
.docker/cert/
expire_in
:
1 week
script
:
-
cd .docker
-
CAOSHOSTNAME=caosdb-server ./cert.sh
style
:
tags
:
[
docker
]
stage
:
style
image
:
$CI_REGISTRY_IMAGE
script
:
-
autopep8 -r --diff --exit-code .
allow_failure
:
true
test
:
tags
:
[
docker
]
services
:
...
...
@@ -153,63 +213,8 @@ test:
-
.docker/hash_*
expire_in
:
1 week
build-testenv
:
tags
:
[
cached-dind
]
image
:
docker:19.03
stage
:
setup
timeout
:
2h
only
:
-
schedules
-
web
-
pushes
needs
:
[]
script
:
-
df -h
-
command -v wget
-
if [ -z "$PYLIB" ]; then
if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
echo "Check if pylib has branch $CI_COMMIT_REF_NAME" ;
if wget https://gitlab.com/api/v4/projects/13656973/repository/branches/${CI_COMMIT_REF_NAME} ; then
PYLIB=$CI_COMMIT_REF_NAME ;
fi;
fi;
fi;
-
PYLIB=${PYLIB:-dev}
-
echo $PYLIB
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# use here general latest or specific branch latest...
-
docker build
--build-arg PYLIB=${PYLIB}
--file .docker/Dockerfile
-t $CI_REGISTRY_IMAGE .
-
docker push $CI_REGISTRY_IMAGE
-
docker save $CI_REGISTRY_IMAGE > /image-cache/caosdb-pyint-testenv-${CI_COMMIT_REF_NAME}.tar
-
cd .docker-base
-
docker build
-t $CI_REGISTRY_IMAGE_BASE .
-
docker push $CI_REGISTRY_IMAGE_BASE
cert
:
tags
:
[
docker
]
stage
:
cert
image
:
$CI_REGISTRY_IMAGE
artifacts
:
paths
:
-
.docker/cert/
expire_in
:
1 week
script
:
-
cd .docker
-
CAOSHOSTNAME=caosdb-server ./cert.sh
style
:
tags
:
[
docker
]
stage
:
style
image
:
$CI_REGISTRY_IMAGE
script
:
-
autopep8 -r --diff --exit-code .
allow_failure
:
true
# Deploy: Store working revision combinations to https://caosdb.org/revisions
store-version
:
tags
:
[
docker
]
stage
:
deploy
...
...
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