aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2020-07-17 13:06:11 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2020-07-22 13:57:55 +0000
commitdf9877a76ce131f9ed1cc1f187847bc5ef5cf814 (patch)
treecc2dc6f595f2be0ed5f59943266653df2ad0f1f1
parent2776802ae1fe4f1fbcd8c99e53bb07295ab97228 (diff)
Run in Python 3.82.5.3
Use image recommended by SECCOM Issue-ID: DCAEGEN2-2292 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I52a358f22c5f9c2e1cad4b574105c8bda10acf25
-rw-r--r--Changelog.md5
-rw-r--r--Dockerfile25
-rw-r--r--pom.xml2
-rw-r--r--setup.py2
-rw-r--r--tox.ini4
-rw-r--r--version.properties2
6 files changed, 24 insertions, 16 deletions
diff --git a/Changelog.md b/Changelog.md
index 12c2a71..f42bbc6 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [2.5.3] - 7/22/2020
+* Run in Python 3.8
+* Add py38 for unit testing
+* Run as "onap" user
+
## [2.5.2] - 8/16/2019
* Switch to py37 for unit testing and docker now that LF supports it under the python jjb
diff --git a/Dockerfile b/Dockerfile
index df26a59..db32b24 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,20 +1,23 @@
-FROM python:3.7-alpine
+FROM python:3.8.2-alpine3.11
MAINTAINER tommy@research.att.com
-COPY . /tmp
-WORKDIR /tmp
-
EXPOSE 10000
# it is an ONAP requirement to make, and switch to, a non root user
-ENV CBSUSER cbs
-RUN addgroup -S $CBSUSER && adduser -S -G $CBSUSER $CBSUSER
+ARG user=onap
+ARG group=onap
+RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
+ chown -R $user:$group /home/$user && \
+ mkdir /var/log/$user && \
+ chown -R $user:$group /var/log/$user && \
+ mkdir /app && \
+ chown -R $user:$group /app
+WORKDIR /app
+
+COPY . /app
-# create logs dir and install
# alpine does not come with GCC like the standard "python" docker base does, which the install needs, see https://wiki.alpinelinux.org/wiki/GCC
-RUN apk add build-base && \
- mkdir -p /opt/logs/ && \
- chown $CBSUSER:$CBSUSER /opt/logs && \
+RUN apk add build-base libffi-dev && \
pip install --upgrade pip && \
pip install .
@@ -22,5 +25,5 @@ RUN apk add build-base && \
ENV PROD_LOGGING 1
# Run the application
-USER $CBSUSER
+USER $user
CMD run.py
diff --git a/pom.xml b/pom.xml
index bf516f5..10722c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<groupId>org.onap.dcaegen2.platform</groupId>
<artifactId>configbinding</artifactId>
<name>dcaegen2-platform-configbinding</name>
- <version>2.5.2-SNAPSHOT</version>
+ <version>2.5.3-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/setup.py b/setup.py
index 8ee9816..191a14f 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ from setuptools import setup, find_packages
setup(
name="config_binding_service",
- version="2.5.2",
+ version="2.5.3",
packages=find_packages(exclude=["tests.*", "tests"]),
author="Tommy Carpenter",
author_email="tommy@research.att.com",
diff --git a/tox.ini b/tox.ini
index 614642b..6758393 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,7 @@
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
[tox]
-envlist = py37,flake8
+envlist = py37,py38
[testenv]
deps=
@@ -33,7 +33,7 @@ commands=
coverage xml -i
[testenv:flake8]
-basepython = python3.7
+basepython = python3.8
skip_install = true
deps = flake8
commands = flake8 setup.py config_binding_service tests
diff --git a/version.properties b/version.properties
index d193a56..f15ca21 100644
--- a/version.properties
+++ b/version.properties
@@ -1,6 +1,6 @@
major=2
minor=5
-patch=2
+patch=3
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT