Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
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-pylib
Commits
be3063a0
Commit
be3063a0
authored
5 years ago
by
Henrik tom Woerden
Browse files
Options
Downloads
Patches
Plain Diff
Revert "ci"
This reverts commit 6603c6bd55bd9eaf57b0908cde913c2d5c5675e1.
parent
bb02e16d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+56
-74
56 additions, 74 deletions
.gitlab-ci.yml
tox.ini
+1
-1
1 addition, 1 deletion
tox.ini
unittests/docker/Dockerfile
+7
-0
7 additions, 0 deletions
unittests/docker/Dockerfile
with
64 additions
and
75 deletions
.gitlab-ci.yml
+
56
−
74
View file @
be3063a0
...
...
@@ -20,90 +20,72 @@
#
# ** end header
#
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-pylib-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
# improved performance.
DOCKER_DRIVER
:
overlay2
services
:
-
docker:dind
image
:
$CI_REGISTRY_IMAGE:latest
stages
:
-
setup
-
code_style
-
build
-
setup
-
test
-
deploy
#########
# Setup
#########
# install formatters
setup:install_formatters:python2.7
:
tags
:
[
py27
]
stage
:
setup
script
:
-
pip2 install --upgrade pycodestyle --user
setup:install_formatters:python3.4
:
tags
:
[
py34
]
stage
:
setup
script
:
-
pip3.4 install --upgrade pycodestyle --user
############
# code_style
############
code_style:pycodestyle:python2.7
:
tags
:
[
py27
]
stage
:
code_style
script
:
-
~/.local/bin/pycodestyle --count ./
code_style:pycodestyle:python3.4
:
tags
:
[
py34
]
code_style
:
stage
:
code_style
script
:
-
~/.local/bin/pycodestyle --count ./
#########
# Build
#########
# install python client (python 2.7)
build:pycaosdb:python2.7
:
tags
:
[
py27
]
stage
:
build
script
:
-
python2.7 setup.py install --user
-
pycodestyle --count ./
-
pylint3 --unsafe-load-any-extension=y -d all -e E,F src/caosdb/common
allow_failure
:
true
# install python client (python 3.4)
build:pycaosdb:python3.4
:
tags
:
[
py34
]
stage
:
build
script
:
-
python3.4 setup.py install --user
########
# Test
########
# unit tests for pycaosdb
test:pycaosdb:py34
:
tags
:
[
py34
]
# pylint tests for pycaosdb
test
:
stage
:
test
script
:
-
touch ~/.pycaosdb.ini
-
tox -r
-e py34
-
tox -r
test:pycaosdb:py27
:
tags
:
[
py27
]
stage
:
test
script
:
-
touch ~/.pycaosdb.ini
-
tox -r -e py27
# pylint tests for pycaosdb (python 3.4)
.test:pycaosdb:python3.4:pylint
:
stage
:
test
script
:
-
/usr/bin/env python3.4 /home/caosdb/.local/bin/pylint --unsafe-load-any-extension=y -d all -e E,F client/PyCaosDB/caosdb/common/models.py
trigger_build
:
stage
:
deploy
script
:
-
echo $TOKEN
-
/usr/bin/curl -X POST
-F token=$TOKEN
-F "variables[PYLIB]=$CI_COMMIT_REF_NAME"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
# pylint tests for pycaosdb (python 2.7)
.test:pycaosdb:python2.7:pylint
:
stage
:
test
script
:
-
/usr/bin/env python2.7 /home/caosdb/.local/bin/pylint --unsafe-load-any-extension=y -d all -e E,F client/PyCaosDB/caosdb/common/models.py
build-testenv
:
image
:
docker:latest
stage
:
setup
script
:
-
cd unittests/docker
-
docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# use here general latest or specific branch latest...
-
docker pull $CI_REGISTRY_IMAGE:latest ||
true
-
docker build
--pull
--build-arg COMMIT=$CI_COMMIT_SHORT_SHA
--cache-from $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:latest .
-
docker push $CI_REGISTRY_IMAGE:latest
This diff is collapsed.
Click to expand it.
tox.ini
+
1
−
1
View file @
be3063a0
[tox]
envlist
=
py27, py34, py35, py36
envlist
=
py27, py34, py35, py36
, py37
skip_missing_interpreters
=
true
[testenv]
deps
=
nose
...
...
This diff is collapsed.
Click to expand it.
unittests/docker/Dockerfile
0 → 100644
+
7
−
0
View file @
be3063a0
FROM
debian:latest
RUN
apt-get update
&&
\
apt-get
install
pylint3 python3-pip tox git
\
curl pycodestyle
-y
ARG
COMMIT="dev"
RUN
git clone
-b
dev https://gitlab.gwdg.de/bmp-caosdb/caosdb-pylib.git
&&
\
cd
caosdb-pylib
&&
git checkout
$COMMIT
&&
pip3
install
.
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