mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-08 07:43:20 +08:00
Add jenkins-check.sh to run unit tests from docker.
Roughly as jenkins does.
This commit is contained in:
committed by
Nils Philippsen
parent
ed8b2ee97a
commit
d809d34ed7
23
jenkins-check-Dockerfile
Normal file
23
jenkins-check-Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# This is what jenkins uses to check, roughly
|
||||
|
||||
FROM fedora:24
|
||||
|
||||
# so we don't have to compile those when fetched from PyPI
|
||||
RUN dnf install -y python-pip python2-setuptools python2-cffi python2-zmq python2-cryptography koji python2-pdc-client && \
|
||||
dnf autoremove -y && dnf clean all && \
|
||||
mkdir /opt/fm-orchestrator/
|
||||
WORKDIR /opt/fm-orchestrator/
|
||||
COPY ./requirements.txt /opt/fm-orchestrator/
|
||||
RUN pip install --user -r ./requirements.txt
|
||||
|
||||
# This isn't what we do in jenkins, blah ...
|
||||
# RUN pip install --upgrade -r test-requirements.txt
|
||||
|
||||
RUN pip install --upgrade mock
|
||||
|
||||
# Need to force reinstall so nose gets the virtualenv modules.
|
||||
RUN pip install nose --ignore-installed
|
||||
|
||||
COPY . /opt/fm-orchestrator/
|
||||
|
||||
CMD ["nosetests", "."]
|
||||
4
jenkins-check.sh
Executable file
4
jenkins-check.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
sudo docker build -f jenkins-check-Dockerfile -t fm-orchestrator/jenkins-check-24 .
|
||||
sudo docker run fm-orchestrator/jenkins-check-24
|
||||
Reference in New Issue
Block a user