Jenkins DVC file

This commit is contained in:
Jan Nowak 2021-06-12 17:32:50 +02:00
parent da4c2ad269
commit c273e4c4ee
2 changed files with 51 additions and 0 deletions

View File

@ -16,6 +16,8 @@ RUN pip3 install sacred
RUN pip3 install pymongo RUN pip3 install pymongo
RUN pip3 install mlflow RUN pip3 install mlflow
RUN pip3 install tensorflow==2.5.0rc1 RUN pip3 install tensorflow==2.5.0rc1
RUN pip3 install dvc
RUN pip3 install dvc[ssh]
# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane) # Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane)
WORKDIR /app WORKDIR /app

49
Jenkinsfile_DVC Normal file
View File

@ -0,0 +1,49 @@
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 {
script {
def img = docker.build('rokoch/ium:01')
img.inside {
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 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'
}
}
}