Jenkinsfile fix

This commit is contained in:
Andrzej Preibisz 2022-05-29 15:37:22 +02:00
parent d7c54f104f
commit 108b776f22
3 changed files with 6 additions and 14 deletions

View File

@ -2,3 +2,4 @@
remote = ium_ssh_remote remote = ium_ssh_remote
['remote "ium_ssh_remote"'] ['remote "ium_ssh_remote"']
url = ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl url = ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl
password = IUM@2021

View File

@ -11,10 +11,8 @@ RUN python3 -m pip install dvc[ssh] paramiko
WORKDIR app WORKDIR app
ARG EPOCHS
ENV EPOCHS=${EPOCHS}
COPY ml_prepare.py ./ COPY ml_prepare.py ./
COPY ml_training.py ./ COPY ml_training.py ./
RUN useradd -r -u 111 s444465
CMD ["python3", "./ml_training.py $EPOCHS"] CMD ["python3", "./ml_training.py"]

View File

@ -2,13 +2,6 @@ pipeline {
agent { agent {
dockerfile true dockerfile true
} }
parameters {
string(
defaultValue: "10",
description: 'Number of epochs in training',
name: 'NO_OF_EPOCHS'
)
}
stages { stages {
stage("Git clone") { stage("Git clone") {
steps { steps {
@ -16,12 +9,12 @@ pipeline {
} }
} }
stage("Run DVC") { stage("Run DVC") {
steps { steps{
withCredentials( withCredentials(
[sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: '')]) { [sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: 's444465')]) {
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 remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
sh 'dvc pull' sh 'dvc pull'
sh 'dvc repro'
} }
} }
} }