Split agent

This commit is contained in:
Kamil Guttmann 2022-04-03 19:12:02 +02:00
parent 45a6218f4c
commit c7fa42dd7b

18
Jenkinsfile vendored
View File

@ -17,28 +17,32 @@ pipeline {
name: 'CUTOFF' name: 'CUTOFF'
) )
} }
agent { agent none
dockerfile {
args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY} -e CUTOFF=${params.CUTOFF}'
}
}
stages { stages {
stage('Hello') { stage('Hello') {
agent any
steps { steps {
echo 'Hello World' echo 'Hello World'
} }
} }
stage("Checkout git") { stage("Checkout git") {
agent any
steps { steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]]) checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]])
} }
} }
stage("Download data") { stage("Download data") {
agent {
dockerfile {
args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY} -e CUTOFF=${params.CUTOFF}'
}
}
steps { steps {
sh "echo $KAGGLE_USERNAME $CUTOFF $IS_DOCKER" sh "echo $KAGGLE_USERNAME $CUTOFF"
sh "echo $IS_DOCKER"
sh "./download_data.sh" sh "./download_data.sh"
sh "python3 clean_and_split_data.py" sh "python3 clean_and_split_data.py"
sh "echo $IS_DOCKER"
archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true
} }
} }