adding scripts to jenkinsfile

This commit is contained in:
wikbom 2023-05-10 15:31:09 +02:00
parent fea7c768b2
commit 627b05f12b
2 changed files with 12 additions and 4 deletions

4
Jenkinsfile vendored
View File

@ -1,6 +1,6 @@
node { node {
checkout scm checkout scm
def dockerimage = docker.build("titanic-image") def dockerimage = docker.build("titanic-image", "./dockerfile")
dockerimage.inside { dockerimage.inside {
stage('Preparation') { stage('Preparation') {
properties([ properties([
@ -29,6 +29,7 @@ node {
"KAGGLE_KEY=${params.KAGGLE_KEY}", "KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUTOFF=${params.CUTOFF}"]) { "CUTOFF=${params.CUTOFF}"]) {
sh "./script.sh ${CUTOFF}" sh "./script.sh ${CUTOFF}"
sh "./learning.py"
} }
} }
@ -37,6 +38,7 @@ node {
stage('artifacts') { stage('artifacts') {
echo 'saving artifacts' echo 'saving artifacts'
archiveArtifacts 'output.txt' archiveArtifacts 'output.txt'
archiveArtifacts 'model.pt'
} }
} }
} }

View File

@ -7,6 +7,10 @@ RUN apt install git -y
RUN pip install --user kaggle RUN pip install --user kaggle
RUN pip install --user pandas RUN pip install --user pandas
RUN pip install --user torch
RUN pip install --user keras
RUN pip install --user tensorflow
RUN pip install --user scikit-learn
RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle RUN ln -s ~/.local/bin/kaggle /usr/bin/kaggle
ENV PATH="$PATH:~/.local/bin/kaggle" ENV PATH="$PATH:~/.local/bin/kaggle"
@ -16,5 +20,7 @@ ENV KAGGLE_KEY=""
# RUN echo "alias kaggle='~/.local/bin/kaggle'" >> ~/.bashrc # RUN echo "alias kaggle='~/.local/bin/kaggle'" >> ~/.bashrc
COPY ./script.sh ./ COPY ./script.sh ./
COPY ./learning.py ./
# CMD ./script.sh 300 # CMD ./script.sh 300
# CMD ./learning.py