2021-06-11 23:05:16 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
dockerfile true
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters{
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'WHICH_BUILD'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-06-12 20:31:55 +02:00
|
|
|
|
2021-06-11 23:05:16 +02:00
|
|
|
stages {
|
2021-06-12 20:31:55 +02:00
|
|
|
|
|
|
|
stage('checkout') {
|
|
|
|
steps {
|
|
|
|
git 'https://git.wmi.amu.edu.pl/s434742/ium_s434742.git'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('copy artficats') {
|
2021-06-11 23:05:16 +02:00
|
|
|
steps {
|
2021-06-12 19:48:17 +02:00
|
|
|
copyArtifacts(fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('WHICH_BUILD'))
|
2021-06-11 23:05:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stage('dvc') {
|
|
|
|
steps {
|
|
|
|
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('WHICH_BUILD')
|
|
|
|
sh "dvc init -f"
|
|
|
|
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 keyfile $IUM_SFTP_KEY"
|
|
|
|
sh "dvc pull -f"
|
|
|
|
sh "dvc reproduce"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
build job: 's434742-dvc'
|
|
|
|
mail body: 'SUCCESS DVC', subject: 's434742', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
|
|
|
|
failure {
|
|
|
|
mail body: 'FAILURE DVC', subject: 's434742', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|