From d26b2e9ecf719d45b79ad250b6a61778aed33252 Mon Sep 17 00:00:00 2001 From: s444417 Date: Wed, 6 Apr 2022 17:41:58 +0200 Subject: [PATCH] docker fix --- Dockerfile | 11 +++++++++-- Jenkinsfile | 1 - src/pythonTest.py | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/pythonTest.py diff --git a/Dockerfile b/Dockerfile index 195b747..31228c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ RUN apt-get install -y python3 RUN apt-get install -y unzip RUN apt-get install -y python3-pip -RUN python3 -m pip install --user kaggle -RUN pip install pandas +RUN python3 -m pip install kaggle +RUN python3 -m pip install pandas RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle @@ -20,6 +20,13 @@ WORKDIR /app # Skopiujmy nasz skrypt do katalogu /app w kontenerze COPY ./startscript1.sh ./ COPY ./src/task1python.py ./src/task1python.py +COPY ./src/pythonTest.py ./src/pythonTest.py + +RUN "chmod a+x ./startscript1.sh" +RUN "chmod a+x ./src/task1python.py" +RUN "chmod a+x ./src/pythonTest.py" + + # Domyślne polecenie, które zostanie uruchomione w kontenerze po jego starcie # RUN chmod u+x ./startscript1.sh diff --git a/Jenkinsfile b/Jenkinsfile index 6e5c344..1f6099e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,6 @@ pipeline { } stage("Shell Scripts") { steps { - sh "chmod u+x ./startscript1.sh" sh "KAGGLE_USERNAME=${params.KAGGLE_USERNAME} KAGGLE_KEY=${params.KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript1.sh" sh 'python3 ./src/task1python.py' archiveArtifacts 'data.txt' diff --git a/src/pythonTest.py b/src/pythonTest.py new file mode 100644 index 0000000..19ce09a --- /dev/null +++ b/src/pythonTest.py @@ -0,0 +1,4 @@ +import pandas as pd + +abc = pd.array(['a','b','c']) +print(abc) \ No newline at end of file