forked from s464914/ium_464914
Update Jenkinsfile
This commit is contained in:
parent
bc60304c8a
commit
66d15ac8f4
31
Jenkinsfile
vendored
31
Jenkinsfile
vendored
@ -11,38 +11,17 @@ pipeline {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('Download dataset') {
|
||||
steps {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||
sh 'pip install kaggle'
|
||||
sh 'kaggle datasets download -d uciml/forest-cover-type-dataset'
|
||||
sh 'unzip -o forest-cover-type-dataset.zip'
|
||||
sh 'rm forest-cover-type-dataset.zip'
|
||||
stage('Copy Artifacts') {
|
||||
steps {
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464914-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
def customImage = docker.build("custom-image")
|
||||
customImage.inside {
|
||||
sh 'python3 ./IUM_2.py'
|
||||
archiveArtifacts artifacts: 'covtype.csv, forest_train.csv, forest_test.csv, forest_val.csv', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Train and Predict') {
|
||||
stage('Train') {
|
||||
steps {
|
||||
script {
|
||||
def customImage = docker.build("custom-image")
|
||||
customImage.inside {
|
||||
sh 'python3 ./model.py'
|
||||
sh 'python3 ./prediction.py'
|
||||
archiveArtifacts artifacts: 'model.pth, predictions.txt', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user