Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DZDTools
motherlode
Commits
a8c029e3
Commit
a8c029e3
authored
Mar 14, 2022
by
Tim Bleimehl
🤸🏼
Browse files
add labels to pipeline and members
parent
97a844d1
Pipeline
#2190
passed with stage
in 1 minute and 23 seconds
Changes
3
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
a8c029e3
FROM
python:3.7
LABEL
motherlode.dzd-ev.de/pipeline=true
RUN
mkdir
-p
/opt/Motherlode
COPY
./Motherlode /opt/Motherlode
...
...
Motherlode/config.py
View file @
a8c029e3
from
Configs
import
ConfigBase
from
typing
import
Dict
class
DEFAULT
(
ConfigBase
):
NEO4J
=
{}
...
...
@@ -7,6 +7,7 @@ class DEFAULT(ConfigBase):
# docker.DockerClient params as dict. https://docker-py.readthedocs.io/en/stable/client.html#client-reference
DOCKER_CLIENT
=
{
"base_url"
:
"unix:///var/run/docker.sock"
}
DOCKER_NETWORK_MODE
=
"bridge"
CONTAINER_LABELS
:
Dict
=
{}
FORCE_IMAGE_REPULL
=
False
LOG_PATH
=
"./logs"
DOT_ENV_PATH
=
"/data/.env"
...
...
Motherlode/pipeline_manager.py
View file @
a8c029e3
...
...
@@ -19,8 +19,9 @@ class PipelineManager:
pipeline
=
Pipeline
(
config
.
PIPELINE_DEF_FILE
,
docker_client
=
docker
.
DockerClient
(
**
config
.
DOCKER_CLIENT
),
dot_env_path
=
config
.
DOT_ENV_PATH
,
dot_env_path
=
config
.
DOT_ENV_PATH
)
pipeline
.
global_labels
=
{
**
config
.
CONTAINER_LABELS
,
"motherlode.dzd-ev.de/pipeline-member"
:
"true"
}
pipeline
.
container_force_image_pull
=
config
.
FORCE_IMAGE_REPULL
pipeline
.
container_pre_pull_callback
=
(
self
.
_callback_attach_container_registry_data
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment