Commit a7f2d6b1 authored by BorjaEst's avatar BorjaEst
Browse files

Merge branch 'python_dev' into python

parents c2ed170a 2d9d065f
......@@ -10,6 +10,13 @@
.history/
### Datafiles
data/*
!data/.gitignore
output/*
!output/.gitignore
### Python
# Byte-compiled / optimized / DLL files
__pycache__/
......
......@@ -22,7 +22,7 @@ LABEL maintainer='Borja Esteban'
ARG branch=python
# Which user and group to use
ARG user=worker
ARG user=application
ARG group=standard
# Install system updates and tools
......@@ -43,6 +43,7 @@ RUN git clone --depth 1 -b ${branch} https://github.com/BorjaEst/cicd.git app &&
cd app && \
pip3 install --no-cache-dir -e . && \
pip3 install --no-cache-dir gunicorn && \
pip3 install --no-cache-dir tox && \
# Clean up
rm -rf /root/.cache/pip/* && \
rm -rf /tmp/*
......@@ -57,7 +58,8 @@ EXPOSE 8080
# Change user context and drop root privileges
RUN groupadd -r ${group} && \
useradd --no-log-init -r -g ${group} ${user}
useradd --no-log-init -r -d /app -g ${group} ${user} && \
chown -R ${user} .
USER ${user}
# Start default script
......
pipeline {
agent { dockerfile true }
stages {
stage('Unit testing') {
steps {
echo '====================executing unittest================================'
sh 'tox'
}
}
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist = py37, py38
envlist = py38
[testenv]
deps =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment