IUM_s464980/Jenkinsfile

64 lines
1.8 KiB
Plaintext
Raw Normal View History

2024-03-20 14:29:57 +01:00
pipeline {
agent any
parameters {
string (
name: 'KAGGLE_USERNAME',
defaultValue: 'ardenw',
description: 'Kaggle username'
)
password (
2024-04-02 20:24:31 +02:00
name: 'API_KEY',
defaultValue: '',
description: 'Kaggle API key'
)
string (
name: 'DATA_TRAIN_RATIO',
2024-03-26 18:45:26 +01:00
defaultValue: '80',
description: 'Train data ratio percentage'
)
string (
name: 'CUTOFF',
defaultValue: '500',
description: 'Cutoff value'
)
}
2024-03-20 14:29:57 +01:00
stages {
2024-03-20 14:58:46 +01:00
stage('Checkout repository') {
2024-03-20 14:29:57 +01:00
steps {
checkout scm
2024-03-20 14:58:46 +01:00
}
}
2024-04-02 20:24:31 +02:00
stage('Download dataset') {
steps {
2024-05-28 21:22:01 +02:00
withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) {
sh 'dvc remote add -d ium_ssh_remote ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl/ium-sftp'
sh 'dvc remote modify --local ium_ssh_remote password $IUM_SFTP_PASS'
sh 'dvc pull'
}
2024-04-02 20:24:31 +02:00
}
}
}
2024-04-02 20:02:32 +02:00
stage('Prepare dataset') {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
2024-03-20 14:58:46 +01:00
steps {
2024-04-02 20:02:32 +02:00
sh "chmod +x ./get_dataset.py"
2024-04-02 20:24:31 +02:00
sh "python ./get_dataset.py"
2024-04-02 20:02:32 +02:00
archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true
}
2024-03-20 14:29:57 +01:00
}
2024-05-14 21:54:36 +02:00
stage('Run training'){
steps{
script {
build(job: 's464980-training/master')
}
2024-05-14 21:56:39 +02:00
}
2024-05-14 21:54:36 +02:00
}
2024-05-14 21:57:31 +02:00
}
2024-03-26 18:34:28 +01:00
}