From f5a18d191a1a3dcf6ed5be0459f23a3b39751eab Mon Sep 17 00:00:00 2001 From: Djalim Simaila Date: Thu, 21 Dec 2023 10:12:24 +0100 Subject: [PATCH] docker files --- .gitignore | 1 + Dockerfile | 6 ++++++ JenkinsDockerfile | 16 ++++++++++++++++ .../test_addition.cpython-311-pytest-7.4.3.pyc | Bin 1831 -> 0 bytes requirements.txt | 1 + src/__pycache__/__init__.cpython-311.pyc | Bin 225 -> 0 bytes src/__pycache__/calculator.cpython-311.pyc | Bin 1251 -> 0 bytes 7 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 JenkinsDockerfile delete mode 100644 __pycache__/test_addition.cpython-311-pytest-7.4.3.pyc create mode 100644 requirements.txt delete mode 100644 src/__pycache__/__init__.cpython-311.pyc delete mode 100644 src/__pycache__/calculator.cpython-311.pyc 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..309662b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.6-slim +COPY . /python-test-calculator +WORKDIR /python-test-calculator +RUN pip install --break-system-packages --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 b299ee543f9401514c28cdce6210e3981cad9189..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1831 zcmZ`(&ub(_6t3#-ndwe;5~H#vipxY1wlC@3jS&xt?6RwP3PNNdb7^X)DoM}wFRFS> zCd@!k5tTjUA`9X-WC*)vMQ4_3Gz( zeT;xa7hj3r;r%x{g=hog>^>OJ2`8NTq)D^47U(UFlE7$IC`L5D8q}J#%%;BCG`apY zXJ;vz@u`4H-ZrP@(&Ny$OQ%DUA9sXxA#fcKog>cHXJt$P+MWS<;GYYxCOGdv+9kdR$bJEnFNk`5BzL6<^~fI7 zxnI^QM|su%nt4VtS>z^UB$HX-J!3S}sP`po z;TG*{eR#vhj4hvFIVZRRC%7awz0j7HY`XpGd$;569a}Y)mKtcz+bXR}p*ntIYpD(~ zRP);tOerCgjI#h702gdaV%Bu*e%wujN?az>DYwOZ-<2Ykttg0@6zL5JyH7fvpLii8 z_ak7ablO!LQOD;Q)m`_aC(L(47Kqex6GjU|}eP^KgTCp=fZ?h-Jh(Ev(D=Oh#>yH10WofwAr- zPQFT6ku`ftXk{i-FU;|8Kiy@A=Jb&{ePB+X>O~|A|AWMTOZMfs>#Xzh^XuSCOx=J| zew_MH|J7Km{YDpS_IPR*%_{L0N@v{so9FW8!jmh-rt}hM)e=f;15DO&%!HDyIq36N z$7j$<+1kik5XsKD#D$QvsLIv4Fc$-89bbGTZ$kigUEvvluc!1Fm+Si90l9VMIVSa; W?00Ht^o>(eDpRAd!Y`|=i2ne|8m_wl 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 ec8bb51fecae8d7d5bafa4e4020a493f63ef62cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmXv|F$%&!5WF)eB8XqO*2V>G#U|Dw1Z=~REb&5eCwrGdEPaGe5Z~no0_jq@0W-zy z?93GNUM?4c@#vp8-0wgmsO%JtS96m?y!JE)b5T zu1pO_mvLx=hl_5i0I_Sxs~swBEh5BMZ7ixB)s0-2F?o+ zHn<`W95{o`nx`BoT*sxp8~GIS7hCN(K^YUeV)`w^TL4?=$e!uo&i$U9@7wu9JO3>` z{r>fbM_WrnaHC6C1lX!b=sF5rP%!~8DubAWeVmd}O$q8Mkp(lUW6~O?0WQrB=`LVz zLV>-O-xgPaPhaRivco(6&OX7sb&qjz4R|wu=GH|qO8f|$^GZ}>4I-p;iAQ7AI;&7I zdq%dI+O1pTuI+SwoX!W+!sjRmW+F?S+$(u|}cHBPvv>Rb>nP$U#&)eot< zU9jURPkMn=G;n#G0B4*uu6XigyTzXg5sKd=B8(_B<0h<