diff --git a/Dockerfile b/Dockerfile index 42aa370..b09f625 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,4 @@ RUN pip3 install kaggle pandas scikit-learn WORKDIR /app -COPY IUM_2.py ./ +COPY IUM_2.py model.py prediction.py ./ diff --git a/Jenkinsfile b/Jenkinsfile index 7525c07..8ac9773 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,5 +35,16 @@ pipeline { } } } + + stage('Train and Predict') { + steps { + def customImage = docker.build("custom-image") + customImage.inside { + sh 'python3 ./model.py' + sh 'python3 ./prediction.py' + archiveArtifacts artifacts: 'model.pth, predictions.txt', onlyIfSuccessful: true + } + } + } } } \ No newline at end of file