ium_426206/Jenkinsfile_DVC

57 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2021-06-12 17:32:50 +02:00
pipeline {
agent any
stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]])
}
}
stage('docker') {
steps {
2021-06-12 17:34:34 +02:00
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: '')])
{
script {
def img = docker.build('rokoch/ium:01')
img.inside {
2021-06-12 17:55:40 +02:00
//sh 'dvc init -f'
//sh 'dvc run -n prepare -d create_dataset.py -o train_dataset.pt -o val_dataset.pt python3 create_dataset.py'
//sh 'dvc run -n train -d dlgssdpytorch.py -d train_dataset.pt -d val_dataset.pt -o model.pt python3 dlgssdpytorch.py'
2021-06-12 17:34:34 +02:00
sh 'dvc remote add -f -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@2021'
2021-06-12 17:55:40 +02:00
//sh 'dvc push'
2021-06-12 17:34:34 +02:00
sh 'dvc pull'
sh 'dvc reproduce'
}
2021-06-12 17:32:50 +02:00
}
}
}
}
stage('end') {
steps {
//Zarchiwizuj wynik
archiveArtifacts 'model.pt'
}
}
}
post {
success {
//Wysłanie maila
emailext body: 'Success DVC',
subject: 's426206 DVC',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'Unstable DVC', subject: 's426206 DVC', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'Failure DVC', subject: 's426206 DVC', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'Changed DVC', subject: 's426206 DVC', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}