From 02636aac96b55f5d19b60cd6ad94fccd9e9c3a53 Mon Sep 17 00:00:00 2001 From: piotr6789 Date: Fri, 11 Jun 2021 19:25:35 +0200 Subject: [PATCH] changed jenkinsfile --- dvc.yaml | 2 +- dvc/Jenkinsfile | 46 ++++++++++------------------------------------ 2 files changed, 11 insertions(+), 37 deletions(-) diff --git a/dvc.yaml b/dvc.yaml index baad6e8..11d2aeb 100644 --- a/dvc.yaml +++ b/dvc.yaml @@ -4,4 +4,4 @@ stages: stats: cmd: python ./stats.py split: - cmd: ./bash.sh + cmd: ./bash2.sh diff --git a/dvc/Jenkinsfile b/dvc/Jenkinsfile index 8ce2cd2..df13baf 100644 --- a/dvc/Jenkinsfile +++ b/dvc/Jenkinsfile @@ -10,44 +10,18 @@ pipeline { ) } stages { - stage('One') { - properties([ - parameters([ - string(defaultValue: '', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false), - password(defaultValue: '', - description: 'Kaggle token', - name: 'KAGGLE_KEY'), - string(defaultValue: '1000', - description: 'Data cutoff', - name: 'CUTOFF', - trim: false) - ]) - ] - ) - stage('Two') { - - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}" ]) { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s440058/ium_440058']]]) - - checkout scm - - def image = docker.build("s440058/ium") - image.inside { - sh 'python3 ./pytorch-example.py > model.txt' - sh "chmod 777 ./bash.sh" - sh "./bash.sh" - - archiveArtifacts "courses.data.dev" - archiveArtifacts "courses.data.test" - archiveArtifacts "courses.data.train" - archiveArtifacts 'model.txt' - } + stage('checkout') { + steps { + git 'https://git.wmi.amu.edu.pl/s440058/ium_440058.git' + copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('BUILD_SELECTOR') } } + stage('sh: Shell Script') { + steps { + sh 'chmod +x ./bash2.sh' + sh './bash2.sh' + } + } stage('DVC') { steps { withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {