From c7fa42dd7b9f6db132ef1d2499a8fe5c6d235c51 Mon Sep 17 00:00:00 2001 From: Kamil Guttmann Date: Sun, 3 Apr 2022 19:12:02 +0200 Subject: [PATCH] Split agent --- Jenkinsfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0cf9285..a02b6dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,28 +17,32 @@ pipeline { name: 'CUTOFF' ) } - agent { - dockerfile { - args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY} -e CUTOFF=${params.CUTOFF}' - } - } + agent none stages { stage('Hello') { + agent any steps { echo 'Hello World' } } stage("Checkout git") { + agent any steps { checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]]) } } stage("Download data") { + agent { + dockerfile { + args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY} -e CUTOFF=${params.CUTOFF}' + } + } steps { - sh "echo $KAGGLE_USERNAME $CUTOFF $IS_DOCKER" + sh "echo $KAGGLE_USERNAME $CUTOFF" + sh "echo $IS_DOCKER" sh "./download_data.sh" sh "python3 clean_and_split_data.py" - sh "echo $IS_DOCKER" + archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true } }