This commit is contained in:
ulaniuk 2022-05-04 19:18:48 +02:00
parent 3f803ca909
commit 382a84a90c
10 changed files with 20 additions and 26 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.7 FROM ubuntu:latest
WORKDIR / WORKDIR /
@ -17,7 +17,9 @@ RUN pip install --user seaborn
COPY KaggleV2-May-2016.csv ./ COPY KaggleV2-May-2016.csv ./
COPY create_data.py ./ COPY create_data.py ./
COPY stats_data.py ./ COPY stats_data.py ./
COPY stats_data.py ./ COPY train_model.py ./
CMD ["python", "train_model.py"]
# CMD ["python", "create_data.py"] # CMD ["python", "create_data.py"]
# CMD ["python", "stats_data.py"] # CMD ["python", "stats_data.py"]

36
Jenkinsfile vendored
View File

@ -1,5 +1,4 @@
pipeline { pipeline {
agent any
parameters{ parameters{
password( password(
defaultValue: '', defaultValue: '',
@ -22,8 +21,13 @@ pipeline {
KAGGLE_KEY="$params.KAGGLE_KEY" KAGGLE_KEY="$params.KAGGLE_KEY"
CUTOFF="$params.CUTOFF" CUTOFF="$params.CUTOFF"
} }
stages { agent
stage('Checkout') { {
dockerfile true
}
stages {
stage('Checkout') {
steps { steps {
script { script {
git credentialsId: 'jenkins-user-github', url: 'https://git.wmi.amu.edu.pl/s478855/ium_478855.git' git credentialsId: 'jenkins-user-github', url: 'https://git.wmi.amu.edu.pl/s478855/ium_478855.git'
@ -33,27 +37,15 @@ pipeline {
} }
} }
} }
stage("Build docker") { stage("Preparation") {
steps { steps {
sh 'echo "BUILD DOCKER"'
sh 'docker build -t ium .'
}
}
stage("Data Preparation") {
steps {
sh 'echo "DATA PREPARATION"'
sh "chmod u+x ./preparation.sh" sh "chmod u+x ./preparation.sh"
sh "./preparation.sh" sh "./preparation.sh"
archiveArtifacts 'KaggleV2-May-2016.csv' archiveArtifacts 'KaggleV2-May-2016.csv'
archiveArtifacts 'data_description.csv'
archiveArtifacts 'train_dataset.csv'
archiveArtifacts 'test_dataset.csv'
} }
} }
stage("Statistics") { }
steps {
sh 'echo "STATISTICS"'
sh "chmod u+x ./statistics.sh"
sh "./statistics.sh"
archiveArtifacts 'statistics.csv'
}
}
}
} }

0
Jenkinsfile2 Normal file
View File

1
preparation.sh Normal file
View File

@ -0,0 +1 @@
python ./scripts/create_data.py

View File

@ -1 +0,0 @@
echo "Preparation inner"

View File

@ -1 +0,0 @@
wc -l KaggleV2-May-2016.csv >> statistics.csv

1
statistics.sh Normal file
View File

@ -0,0 +1 @@
python ./scripts/statistics.py