From 379beaf2d9052b992d7240b9adedd14be4bd3a54 Mon Sep 17 00:00:00 2001 From: Karolina Oparczyk Date: Wed, 14 Apr 2021 20:40:09 +0200 Subject: [PATCH] docker integration --- Jenkinsfile | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e2d701d..cb3cb6a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,18 +20,23 @@ node { } stage('Clone repo') { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]){ - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]]) - sh ''' - #!/usr/bin/env bash - chmod 777 get_data_simple.sh - ./get_data_simple.sh $CUTOFF | tee output.txt - ''' - archiveArtifacts "data_dev" - archiveArtifacts "data_shuf" - archiveArtifacts "data_test" - archiveArtifacts "data_train" - archiveArtifacts "output.txt" + checkout scm + def testImage = docker.build("karopa/ium:01") + testImage.inside { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]){ + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]]) + sh ''' + #!/usr/bin/env bash + chmod 777 get_data_simple.sh + ./get_data_simple.sh $CUTOFF | tee output.txt + ''' + archiveArtifacts "data_dev" + archiveArtifacts "data_shuf" + archiveArtifacts "data_test" + archiveArtifacts "data_train" + archiveArtifacts "output.txt" + } } + } } \ No newline at end of file