Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
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-webui
Commits
06f20da2
Commit
06f20da2
authored
5 years ago
by
Henrik tom Woerden
Browse files
Options
Downloads
Patches
Plain Diff
F ci
parent
42e5a7af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+53
-21
53 additions, 21 deletions
.gitlab-ci.yml
makefile
+2
-2
2 additions, 2 deletions
makefile
test/docker/Dockerfile
+7
-0
7 additions, 0 deletions
test/docker/Dockerfile
with
62 additions
and
23 deletions
.gitlab-ci.yml
+
53
−
21
View file @
06f20da2
...
...
@@ -21,6 +21,32 @@
# ** end header
#
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb-webui-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
-
linting
...
...
@@ -31,24 +57,7 @@ stages:
# setup
#######
# install pylint
setup:install-pylint
:
stage
:
setup
tags
:
[
py36
]
script
:
-
pip3 install pylint --user
#########
# linting
#########
# pylint everything
linting:pylint:python3
:
stage
:
linting
tags
:
[
py36
]
script
:
-
make pylint
### TODO !!! use respective docker image
######
# test
######
...
...
@@ -56,18 +65,41 @@ linting:pylint:python3:
# run qunit tests
test:qunit
:
stage
:
test
tags
:
[
py36
]
#
tags: [ py36 ]
artifacts
:
paths
:
-
public/qunit.log
-
screenlog.*
script
:
-
make run-qunit
-
make pylint
# TODO fix the following
# - make run-qunit
trigger_build
:
stage
:
deploy
script
:
-
echo $TOKEN
-
/usr/bin/curl -X POST
-F token=$TOKEN
-F "variables[
PYLIB
]=$CI_COMMIT_REF_NAME"
-F "variables[
WEBUI
]=$CI_COMMIT_REF_NAME"
-F ref=master https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
build-testenv
:
image
:
docker:latest
stage
:
setup
script
:
-
echo $TRIGGERED_BY
-
echo $MYSQLBACKEND
-
ping -4 -c 3 registry.indiscale.com
-
echo $PYLIB
-
cd test/docker
-
echo $CI_REGISTRY_PASSWORD
-
echo $CI_REGISTRY
-
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
--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.
makefile
+
2
−
2
View file @
06f20da2
...
...
@@ -173,11 +173,11 @@ unzip:
for
f
in
$(
LIBS_ZIP
);
do
unzip
-o
-d
libs
$$
f
;
done
PYLINT
=
pylint
-d
all
-e
E,F
PYLINT
=
pylint
3
-d
all
-e
E,F
PYTHON_FILES
=
$(
subst
$(
ROOT_DIR
)
/,,
$(
shell find
$(
ROOT_DIR
)
/
-iname
"*.py"
))
pylint
:
$(PYTHON_FILES)
for
f
in
$(
PYTHON_FILES
);
do
$(
PYLINT
)
$$
f
||
exit
1
;
done
PYLINT_LOCAL
=
/usr/bin/pylint
-d
all
-e
E,F
PYLINT_LOCAL
=
/usr/bin/pylint
3
-d
all
-e
E,F
pylint-local
:
$(PYTHON_FILES)
for
f
in
$(
PYTHON_FILES
);
do
$(
PYLINT_LOCAL
)
$$
f
||
exit
1
;
done
This diff is collapsed.
Click to expand it.
test/docker/Dockerfile
0 → 100644
+
7
−
0
View file @
06f20da2
FROM
debian:latest
RUN
apt-get update
&&
\
apt-get
install
firefox-esr pylint3 python3-pip python3-httpbin git
\
curl
-y
RUN
git clone
-b
dev https://gitlab.gwdg.de/bmp-caosdb/caosdb-pylib.git
&&
\
cd
caosdb-pylib
&&
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