Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
synergy
o3skim
Commits
2d9d065f
Commit
2d9d065f
authored
Aug 14, 2020
by
BorjaEst
Browse files
Run tox inside docker-pipeline
parent
396bc989
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
2d9d065f
...
...
@@ -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
...
...
Jenkinsfile
View file @
2d9d065f
...
...
@@ -5,8 +5,7 @@ pipeline {
stage
(
'Unit testing'
)
{
steps
{
echo
'====================executing unittest================================'
echo
'Edit Jenkinsfile - Install test dependencies'
echo
'Edit Jenkinsfile - Trigger unittesting'
sh
'tox'
}
}
}
...
...
tox.ini
View file @
2d9d065f
...
...
@@ -4,7 +4,7 @@
# and then run "tox" from this directory.
[tox]
envlist
=
py37,
py38
envlist
=
py38
[testenv]
deps
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment