Changed jenkisfile
This commit is contained in:
parent
a22b4cc571
commit
fe4874a2a1
79
Jenkinsfile
vendored
79
Jenkinsfile
vendored
@ -1,46 +1,39 @@
|
||||
node {
|
||||
stage('Preparation') {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: 'Hello World!',
|
||||
description: 'Tekst do wyświetlenie',
|
||||
name: 'INPUT_TEXT',
|
||||
trim: false
|
||||
),
|
||||
string(
|
||||
defaultValue: "10000",
|
||||
description: "How many records use",
|
||||
name: "CUTOFF"
|
||||
),
|
||||
string (
|
||||
defaultValue: 'andrzejpreibisz',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
),
|
||||
password(
|
||||
defaultValue: '',
|
||||
description: 'Kaggle token key',
|
||||
name: 'KAGGLE_KEY'
|
||||
)
|
||||
])
|
||||
])
|
||||
pipeline {
|
||||
agent any
|
||||
parameters {
|
||||
string (
|
||||
defaultValue: 'andrzejpreibisz',
|
||||
description: 'Kaggle username',
|
||||
name: 'KAGGLE_USERNAME',
|
||||
trim: false
|
||||
)
|
||||
password(
|
||||
defaultValue: '',
|
||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
name: 'KAGGLE_KEY'
|
||||
)
|
||||
string(
|
||||
defaultValue: "10000",
|
||||
description: 'Use CUTOFF random examples from dataset',
|
||||
name: 'CUTOFF'
|
||||
)
|
||||
}
|
||||
stage("Git clone"){
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]])
|
||||
}
|
||||
stage('Download') {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}",
|
||||
stages {
|
||||
stage("Git clone") {
|
||||
steps {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]])
|
||||
}
|
||||
}
|
||||
stage("Download data") {
|
||||
steps {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}",
|
||||
"CUTOFF=${params.CUTOFF}"]) {
|
||||
sh "chmod 777 dataset_script.sh"
|
||||
sh "./dataset_script.sh $CUTOFF"
|
||||
}
|
||||
sh "chmod 777 dataset_script.sh"
|
||||
sh "./dataset_script.sh $CUTOFF"
|
||||
archiveArtifacts artifacts: "heart_2020_test.csv, heart_2020_train.csv, heart_2020_sorted.csv", onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Goodbye') {
|
||||
echo 'Goodbye!'
|
||||
//Zarchiwizuj wynik
|
||||
archiveArtifacts 'heart_2020_test.csv, heart_2020_train.csv, heart_2020_sorted.csv'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user