diff --git a/.gitignore b/.gitignore index 9e3d04c..1313640 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ venv* +**__pycache__** diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..97de8fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.6-slim +COPY . /python-test-calculator +WORKDIR /python-test-calculator +RUN pip3 install --no-cache-dir -r requirements.txt +RUN ["pytest", "-v", "--junitxml=reports/result.xml"] +CMD tail -f /dev/nul diff --git a/JenkinsDockerfile b/JenkinsDockerfile new file mode 100644 index 0000000..3ab50e8 --- /dev/null +++ b/JenkinsDockerfile @@ -0,0 +1,16 @@ +FROM jenkins/jenkins:lts +USER root +RUN apt-get update -qq \ + && apt-get install -qqy apt-transport-https ca-certificates \ + curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg \ + | apt-key add - + +RUN add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/debian \ + $(lsb_release -cs) \ + stable" + +RUN apt-get update -qq \ + && apt-get install docker-ce -y diff --git a/__pycache__/test_addition.cpython-311-pytest-7.4.3.pyc b/__pycache__/test_addition.cpython-311-pytest-7.4.3.pyc deleted file mode 100644 index b299ee5..0000000 Binary files a/__pycache__/test_addition.cpython-311-pytest-7.4.3.pyc and /dev/null differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e079f8a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pytest diff --git a/src/__pycache__/__init__.cpython-311.pyc b/src/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index ec8bb51..0000000 Binary files a/src/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/src/__pycache__/calculator.cpython-311.pyc b/src/__pycache__/calculator.cpython-311.pyc deleted file mode 100644 index b8b736c..0000000 Binary files a/src/__pycache__/calculator.cpython-311.pyc and /dev/null differ