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 { withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: '')]) { script { def img = docker.build('rokoch/ium:01') img.inside { //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' 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' //sh 'dvc push' sh 'dvc pull' sh 'dvc reproduce' } } } } } 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' } } }