forked from s464914/ium_464914
39 lines
1.4 KiB
Groovy
39 lines
1.4 KiB
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
string(name: 'KAGGLE_USERNAME', defaultValue: 'alicjaszulecka', description: 'Kaggle username')
|
|
password(name: 'KAGGLE_KEY', defaultValue:'', description: 'Kaggle Key')
|
|
string(name: 'CUTOFF', defaultValue: '100', description: 'cut off number')
|
|
}
|
|
stages {
|
|
stage('Git Checkout') {
|
|
steps {
|
|
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 nasa/meteorite-landings'
|
|
sh 'unzip -o meteorite-landings.zip'
|
|
sh 'rm meteorite-landings.zip'
|
|
}
|
|
}
|
|
}
|
|
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: 'meteorite-landings.csv, meteorite_train.csv, meteorite_test.csv, meteorite_val.csv', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |