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

8
Jenkinsfile vendored
View File

@ -1,7 +1,7 @@
node {
checkout scm
def dockerimage = docker.build("titanic-image")
dockerimage.inside {
checkout scm
def dockerimage = docker.build("titanic-image", "./dockerfile")
dockerimage.inside {
stage('Preparation') {
properties([
parameters([
@ -29,6 +29,7 @@ node {
"KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUTOFF=${params.CUTOFF}"]) {
sh "./script.sh ${CUTOFF}"
sh "./learning.py"
}
}
@ -37,6 +38,7 @@ node {
stage('artifacts') {
echo 'saving artifacts'
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 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
ENV PATH="$PATH:~/.local/bin/kaggle"
@ -16,5 +20,7 @@ ENV KAGGLE_KEY=""
# RUN echo "alias kaggle='~/.local/bin/kaggle'" >> ~/.bashrc
COPY ./script.sh ./
COPY ./learning.py ./
# CMD ./script.sh 300
# CMD ./script.sh 300
# CMD ./learning.py