diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6b954b58..e9121f77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,18 +31,20 @@ build_images: - echo '{"auths":{"'$CI_REGISTRY'":{"username":"'$CI_REGISTRY_USER'","password":"'$CI_REGISTRY_PASSWORD'"}}}' > /kaniko/.docker/config.json - | + # Base image for each commit + /kaniko/executor --context ./ --dockerfile deploy/docker/base/Dockerfile --destination ${CI_REGISTRY_PREFIX}/f7t-base:${CI_COMMIT_SHORT_SHA} --cleanup # Core microservices - for img in compute reservations status storage tasks utilities; do - /kaniko/executor --build-arg BASE_IMAGE=${CI_REGISTRY_PREFIX}/f7t-base:latest --registry-mirror ${CI_REGISTRY} \ + for img in certificator compute reservations status storage tasks utilities; do + /kaniko/executor --build-arg BASE_IMAGE=${CI_REGISTRY_PREFIX}/f7t-base:${CI_COMMIT_SHORT_SHA} --registry-mirror ${CI_REGISTRY} \ --context ./ --dockerfile deploy/docker/$img/Dockerfile --destination ${CI_REGISTRY_PREFIX}/$img:${CI_COMMIT_SHORT_SHA} --cleanup done if [ "$CI_COMMIT_TAG" != "" ]; then exit 0; fi # Certificator separated since its base image is different (centos:7) - /kaniko/executor --context ./ --dockerfile "deploy/docker/certificator/Dockerfile" \ - --destination "${CI_REGISTRY_PREFIX}/certificator:${CI_COMMIT_SHORT_SHA}" --cleanup + # /kaniko/executor --context ./ --dockerfile "deploy/docker/certificator/Dockerfile" \ + # --destination "${CI_REGISTRY_PREFIX}/certificator:${CI_COMMIT_SHORT_SHA}" --cleanup # build web client /kaniko/executor --context src/tests/template_client --dockerfile ./Dockerfile \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f668c7d..426f419e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.13.0] + +### Added + +### Changed + +- Flask version upgraded to `2.3.2` +- Cryptography version upgraded to `39.0.2` +- Certificator now uses `f7t-base` as base image + +### Fixed + ## [1.12.0] ### Added diff --git a/deploy/docker/base/requirements.txt b/deploy/docker/base/requirements.txt index 27f6adb8..f6f25403 100644 --- a/deploy/docker/base/requirements.txt +++ b/deploy/docker/base/requirements.txt @@ -1,8 +1,8 @@ -cryptography==3.4.6 -markupsafe==2.0.1 -Flask==1.1.4 +cryptography==39.0.2 +markupsafe==2.1.2 +Flask==2.3.2 PyJWT==2.4.0 requests==2.22.0 jaeger_client==4.5.0 Flask-Opentracing==1.1.0 -gunicorn==20.1.0 +gunicorn==20.1.0 \ No newline at end of file diff --git a/deploy/docker/certificator/Dockerfile b/deploy/docker/certificator/Dockerfile index cd529b42..cc03b093 100644 --- a/deploy/docker/certificator/Dockerfile +++ b/deploy/docker/certificator/Dockerfile @@ -4,14 +4,11 @@ ## Please, refer to the LICENSE file in the root directory. ## SPDX-License-Identifier: BSD-3-Clause ## -ARG BASE_IMAGE=centos:7 +ARG BASE_IMAGE=f7t-base FROM $BASE_IMAGE -RUN yum install -y epel-release -RUN yum -y update -RUN yum install -y python3-pip openssh - -RUN pip3 install --upgrade pip +RUN apt-get update +RUN apt-get -y install openssh-client ADD deploy/docker/base/requirements.txt base/requirements.txt ADD deploy/docker/certificator/requirements.txt deps/requirements.txt diff --git a/deploy/docker/storage/Dockerfile b/deploy/docker/storage/Dockerfile index 0416bb00..67edbfce 100644 --- a/deploy/docker/storage/Dockerfile +++ b/deploy/docker/storage/Dockerfile @@ -7,6 +7,9 @@ ARG BASE_IMAGE=f7t-base from $BASE_IMAGE +RUN apt-get update +RUN apt-get -y install gcc + ADD deploy/docker/storage/requirements.txt deps/requirements.txt RUN pip3 install -r deps/requirements.txt diff --git a/deploy/docker/storage/requirements.txt b/deploy/docker/storage/requirements.txt index 952bc8c6..9290bb37 100644 --- a/deploy/docker/storage/requirements.txt +++ b/deploy/docker/storage/requirements.txt @@ -1,5 +1,5 @@ -r ../base/requirements.txt -keystoneauth1==4.3.0 +keystoneauth1==5.1.2 lxml==4.9.1 paramiko==2.11.0 -python-keystoneclient==4.2.0 +python-keystoneclient==5.0.0 diff --git a/src/tests/template_client/Dockerfile b/src/tests/template_client/Dockerfile index 7334ef4c..ded9e4eb 100644 --- a/src/tests/template_client/Dockerfile +++ b/src/tests/template_client/Dockerfile @@ -6,7 +6,9 @@ ## FROM python:3.8.12-slim -RUN pip install markupsafe==2.0.1 Flask==1.1.4 flask-WTF flask-bootstrap flask-oidc flask_sslify requests==2.22.0 +RUN pip3 install --upgrade pip + +RUN pip3 install markupsafe==2.1.2 Flask==2.0.0 itsdangerous==2.0.1 flask-WTF flask-bootstrap flask-oidc flask_sslify requests==2.22.0 ADD ./ app diff --git a/src/utilities/utilities.py b/src/utilities/utilities.py index 78625ce5..9d2a4d38 100644 --- a/src/utilities/utilities.py +++ b/src/utilities/utilities.py @@ -566,7 +566,7 @@ def download(): data.seek(0) return send_file(data, mimetype="application/octet-stream", - attachment_filename=file_name, + download_name=file_name, as_attachment=True) except Exception as e: app.logger.error(f"Download decode error: {e.message}") @@ -592,7 +592,7 @@ def download(): return send_file(data, mimetype="application/octet-stream", - attachment_filename=file_name, + download_name=file_name, as_attachment=True)