From dfb8269ad93bc5bb102679f99aa29f05dee32795 Mon Sep 17 00:00:00 2001 From: Alex Thomae Date: Sun, 26 Jan 2020 13:25:07 +0100 Subject: [PATCH] Adds build for armv6. Prepares v0.0.4. Cleanup --- .gitlab-ci.yml | 3 +-- Dockerfile | 4 ++-- README.md | 2 +- src/csp.py | 6 ++++-- src/requirements.txt | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb5dbb0..237c37f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,8 @@ variables: - DOCKER_DRIVER: overlay2 - DOCKERHUB_REPO_PREFIX: ixdotai DOCKERHUB_REPO_NAME: csp ENABLE_ARM64: 'true' ENABLE_ARMv7: 'true' + ENABLE_ARMv6: 'true' include: - project: 'ix.ai/ci-templates' diff --git a/Dockerfile b/Dockerfile index 96304f5..c566da7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:latest - -LABEL maintainer='ix.ai ' +LABEL maintainer="docker@ix.ai" \ + ai.ix.repository="ix.ai/csp" WORKDIR /app diff --git a/README.md b/README.md index 4342bfb..6d1faad 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ services: ## Tags and Arch -Starting with version v0.0.3, the images are multi-arch, with builds for amd64, arm64 and armv7. +Starting with version v0.0.4, the images are multi-arch, with builds for amd64, arm64, armv7 and armv6. * `vN.N.N` - for example v0.0.3 * `latest` - always pointing to the latest version * `dev-branch` - the last build on a feature/development branch diff --git a/src/csp.py b/src/csp.py index 5fa18b3..79753fb 100644 --- a/src/csp.py +++ b/src/csp.py @@ -18,6 +18,8 @@ datefmt='%Y-%m-%d %H:%M:%S' ) +FILENAME = os.path.splitext(sys.modules['__main__'].__file__)[0] + APP = Flask(__name__) APP.secret_key = os.urandom(64).hex() @@ -40,7 +42,7 @@ def configure_logging(): port=SETTINGS['gelf_port'], debug=True, include_extra_fields=True, - _ix_id=os.path.splitext(sys.modules['__main__'].__file__)[0][1:], + _ix_id=FILENAME, ) LOG.addHandler(GELF) gelf_enabled = True @@ -65,7 +67,7 @@ def log_csp(): if __name__ == '__main__': configure_logging() LOG.info("Starting {} {}, listening on {}:{}".format( - os.path.splitext(sys.modules['__main__'].__file__)[0][1:], + FILENAME, # pylint: disable=no-member constants.VERSION, SETTINGS['address'], diff --git a/src/requirements.txt b/src/requirements.txt index 8e579af..0d59df6 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,4 +1,4 @@ waitress==1.4.2 flask==1.1.1 prometheus_client==0.7.1 -pygelf +pygelf==0.3.6