fix: jenkinsfile-dvc

This commit is contained in:
Filip Patyk 2023-05-23 12:41:48 +02:00
parent f142e3e78e
commit 97e9f584e7
2 changed files with 7 additions and 10 deletions

View File

@ -14,7 +14,7 @@ COPY environment.yml /tmp/environment.yml
RUN mamba env create -f /tmp/environment.yml && mamba clean -ya
RUN echo "mamba activate ium" >> ~/.bashrc
ENV PATH /opt/conda/envs/ium/bin:$PATH
RUN pip install dvc[ssh] paramiko
RUN pip install 'dvc[ssh]' paramiko
RUN useradd -r -u 111 jenkins

View File

@ -5,22 +5,19 @@ node {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's424714', url: 'https://git.wmi.amu.edu.pl/s424714/ium_424714']]])
}
stage('Dockerfile build') {
sh "chmod +x -R ${env.WORKSPACE}"
def dockerImage = docker.build("s424714-model:latest")
dockerImage.inside {
withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) {
sh 'dvc remote modify --local ium_ssh_remote password $IUM_SFTP_PASS'
sh 'dvc pull'
sh 'dvc exp run'
}
withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) {
sh 'dvc remote modify --local ium_ssh_remote password $IUM_SFTP_PASS'
sh 'dvc pull'
sh 'dvc repro'
}
}
}
}
}