update jenkinsfile and dockerfile

This commit is contained in:
Maciej Czajka 2022-04-02 13:42:37 +02:00
parent f2c6fcdf0b
commit 8ee15ee101
2 changed files with 10 additions and 16 deletions

View File

@ -9,20 +9,22 @@ RUN pip3 install pandas
RUN pip3 install matplotlib RUN pip3 install matplotlib
RUN pip3 install sklearn RUN pip3 install sklearn
RUN apt-get install unzip RUN apt-get install unzip
RUN mkdir root/.kaggle #RUN mkdir root/.kaggle
RUN touch root/.kaggle/kaggle.json #RUN touch root/.kaggle/kaggle.json
RUN echo "{\"username\":\"maciejczajka\",\"key\":\"d8f044ad2b96d32372e22f9054c02bb1\"}" >> root/.kaggle/kaggle.json #RUN echo "{\"username\":\"maciejczajka\",\"key\":\"d8f044ad2b96d32372e22f9054c02bb1\"}" >> root/.kaggle/kaggle.json
RUN chmod 666 root/.kaggle #RUN chmod 666 root/.kaggle
RUN chmod 666 root/.kaggle/kaggle.json #RUN chmod 666 root/.kaggle/kaggle.json
ENV KAGGLE_USERNAME=maciejczajka
ENV KAGGLE_KEY=d8f044ad2b96d32372e22f9054c02bb1
ENV CUTOFF=1000
WORKDIR /app WORKDIR /app
ENV CUTOFF=1000
COPY download.sh . COPY download.sh .
COPY Zajecia_2/main.py . COPY Zajecia_2/main.py .
RUN ls -al /root/.kaggle/kaggle.json #RUN ls -al /root/.kaggle/kaggle.json
RUN whoami RUN whoami
#RUN ./download.sh #RUN ./download.sh
#CMD ["python3", "./main.py"] #CMD ["python3", "./main.py"]

View File

@ -34,15 +34,7 @@ pipeline {
stage('Script'){ stage('Script'){
steps { steps {
script {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
sh './download.sh $CUTOFF' sh './download.sh $CUTOFF'
archiveArtifacts artifacts: 'all_games.csv.dev, all_games.csv.test, all_games.csv.train', followSymlinks: false
} }
} }
} }