Skip to content

Commit

Permalink
Merge branch 'RESTAPI-860-updaet-flask-2.3.2' into 'master'
Browse files Browse the repository at this point in the history
Upgrade Flask to 2.3.2

See merge request firecrest/firecrest!226
  • Loading branch information
aledabin committed May 12, 2023
2 parents 8dd01ac + 0edf34f commit 63523c2
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 19 deletions.
10 changes: 6 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions deploy/docker/base/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
9 changes: 3 additions & 6 deletions deploy/docker/certificator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions deploy/docker/storage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/storage/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion src/tests/template_client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/utilities/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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)


Expand Down

0 comments on commit 63523c2

Please sign in to comment.