aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-07-23 17:20:20 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-23 17:20:20 +0000
commiteb67917b237c03d5c1f3c2598aa47f3440decd4a (patch)
tree00efdc4af04e5bd32cc7eb8a510a6f35732d3035
parentfb84d6d2d2c577f95ece1340a0f01acbe9f40a7f (diff)
parentdf9877a76ce131f9ed1cc1f187847bc5ef5cf814 (diff)
Merge "Run in Python 3.8"
-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 3f4a3e5..10c2a32 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