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
d806b04f
Commit
d806b04f
authored
5 years ago
by
Henrik tom Wörden
Committed by
Quazgar
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Dockerfile now has one package per line only.
Also in alphabetical order.
parent
22d75e4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.docker/cert.sh
+58
-0
58 additions, 0 deletions
.docker/cert.sh
.docker/docker-compose.yml
+4
-0
4 additions, 0 deletions
.docker/docker-compose.yml
.gitlab-ci.yml
+10
-1
10 additions, 1 deletion
.gitlab-ci.yml
Dockerfile
+8
-1
8 additions, 1 deletion
Dockerfile
with
80 additions
and
2 deletions
.docker/cert.sh
0 → 100755
+
58
−
0
View file @
d806b04f
#!/bin/bash
# ** header v3.0
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2019 Daniel Hornung, Göttingen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
#
# ** end header
# Creates a directory `cert` and certificates in this directory.
#
# The hostname for which the certificate is created can be changed by setting
# the environment variable CAOSHOSTNAME.
#
# ## Overview of variables ##
#
# - CAOSHOSTNAME :: Hostname for the key (localhost)
# - KEYPW :: Password for the key (default ist CaosDBSecret)
# - KEYSTOREPW :: Password for the key store (same as KEYPW)
function
cert
()
{
mkdir
-p
cert
cd
cert
KEYPW
=
"
${
KEYPW
:-
CaosDBSecret
}
"
CAOSHOSTNAME
=
"
${
CAOSHOSTNAME
:-
localhost
}
"
KEYSTOREPW
=
"
${
KEYPW
:-}
"
# NOTE: KEYPW and KEYSTOREPW are the same, due to Java limitations.
KEYPW
=
"
${
KEYPW
}
"
openssl genrsa
-aes256
-out
caosdb.key.pem
\
-passout
env
:KEYPW 2048
# Certificate is for localhost
KEYPW
=
"
${
KEYPW
}
"
openssl req
-new
-x509
-key
caosdb.key.pem
\
-out
caosdb.cert.pem
-passin
env
:KEYPW
\
-subj
"/C=/ST=/L=/O=/OU=/CN=
${
CAOSHOSTNAME
}
"
KEYPW
=
"
${
KEYPW
}
"
KEYSTOREPW
=
"
$KEYSTOREPW
"
openssl pkcs12
-export
\
-inkey
caosdb.key.pem
-in
caosdb.cert.pem
-out
all-certs.pkcs12
\
-passin
env
:KEYPW
-passout
env
:KEYPW
keytool
-importkeystore
-srckeystore
all-certs.pkcs12
-srcstoretype
PKCS12
\
-deststoretype
pkcs12
-destkeystore
caosdb.jks
\
-srcstorepass
"
${
KEYPW
}
"
\
-destkeypass
"
${
KEYPW
}
"
-deststorepass
"
$KEYSTOREPW
"
echo
"Certificates successfuly created."
}
cert
This diff is collapsed.
Click to expand it.
.docker/docker-compose.yml
+
4
−
0
View file @
d806b04f
...
...
@@ -13,6 +13,10 @@ services:
-
sqldb
networks
:
-
caosnet
volumes
:
-
type
:
bind
source
:
./cert
target
:
/opt/caosdb/cert
ports
:
# - "from_outside:from_inside"
-
"
10443:10443"
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
10
−
1
View file @
d806b04f
...
...
@@ -62,6 +62,7 @@ services:
stages
:
-
setup
-
cert
-
style
-
test
...
...
@@ -79,8 +80,8 @@ test:
-
docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker pull $CI_REGISTRY_IMAGE:latest
-
cd .docker
-
ls
-
CAOSDB_TAG=$CAOSDB_TAG docker-compose up -d
-
docker cp docker_caosdb-server_1:/opt/caosdb/cert cert
# writes the return value of the tests into the file result
-
/bin/sh ./run.sh
-
docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
...
...
@@ -88,6 +89,7 @@ test:
-
docker-compose down
-
rc=`cat result`
-
exit $rc
dependencies
:
[
style
]
artifacts
:
paths
:
-
caosdb_log.txt
...
...
@@ -115,5 +117,12 @@ style:
stage
:
style
image
:
$CI_REGISTRY_IMAGE:latest
script
:
-
cd .docker
-
CAOSHOSTNAME=caosdb-server ./cert.sh
-
cd ..
-
autopep8 -r --diff --exit-code .
allow_failure
:
true
artifacts
:
paths
:
-
.docker/cert/
expire_in
:
1 week
This diff is collapsed.
Click to expand it.
.docker/
Dockerfile
→
Dockerfile
+
8
−
1
View file @
d806b04f
FROM
debian:latest
RUN
apt-get update
&&
\
apt-get
install
tox curl python3-pip git python-autopep8
-y
apt-get
install
\
curl
\
git
\
openjdk-11-jdk-headless
\
python-autopep8
\
python3-pip
\
tox
\
-y
COPY
.docker/wait-for-it.sh /wait-for-it.sh
RUN
git clone https://gitlab.com/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