ium-helloworld/Jenkinsfile

47 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2021-05-26 21:26:06 +02:00
node {
2021-05-26 21:40:21 +02:00
def img
stage("Properties"){
properties([
2021-05-26 21:41:36 +02:00
pipelineTriggers([
pollSCM(''),
[$class: 'GogsTrigger']
])
2021-05-26 21:40:21 +02:00
])
}
stage("Checkout"){
git 'https://git.wmi.amu.edu.pl/pms/ium-helloworld.git'
2021-05-26 21:40:21 +02:00
}
stage('Environment') { // for display purposes
img = docker.build('ium-helloworld')
}
2021-06-04 15:11:57 +02:00
img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') {
2021-05-26 21:40:21 +02:00
2022-05-30 11:59:40 +02:00
// stage("Kaggle"){
// withCredentials([usernamePassword(credentialsId: '53ff19bf-dbb7-4275-a609-634b57fe0627', passwordVariable: 'KAGGLE_KEY', usernameVariable: 'KAGGLE_USERNAME')]) {
// sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
// sh 'kaggle datasets list'
// }
// }
2022-04-10 13:51:38 +02:00
2023-04-20 10:48:46 +02:00
stage('MLflow') {
sh 'ls -l /tmp/mlruns'
sh 'ls -l /mlruns'
sh 'python3 ./train.py'
sh 'ls -l /tmp/mlruns'
sh 'ls -l /mlruns'
}
2021-06-04 15:11:57 +02:00
stage("DVC"){
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
2021-06-06 23:53:54 +02:00
sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
2021-06-04 15:11:57 +02:00
sh "dvc pull"
}
}
2021-05-26 21:26:06 +02:00
}
}