Test Jenkinsfile.stats with docker

This commit is contained in:
Kamil Guttmann 2022-04-03 19:39:11 +02:00
parent a72ca4bc0e
commit a9511a9fe5

View File

@ -1,5 +1,7 @@
pipeline { pipeline {
agent any agent {
docker { image 'kamilguttmann/ium:latest' }
}
parameters { parameters {
buildSelector( buildSelector(
defaultSelector: lastSuccessful(), defaultSelector: lastSuccessful(),
@ -13,14 +15,14 @@ pipeline {
copyArtifacts fingerprintArtifacts: true, projectName: 's444380-create-dataset', selector: buildParameter('BUILD_SELECTOR') copyArtifacts fingerprintArtifacts: true, projectName: 's444380-create-dataset', selector: buildParameter('BUILD_SELECTOR')
} }
} }
stage("Checkout git") { /*stage("Checkout git") {
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("Calcualte statistics") { stage("Calcualte statistics") {
steps { steps {
sh "./calc_stats.sh | tee crime.stats.txt" sh "python3 calc_stats.py | tee crime.stats.txt"
archiveArtifacts artifacts: "crime.stats.txt", onlyIfSuccessful: true archiveArtifacts artifacts: "crime.stats.txt", onlyIfSuccessful: true
} }
} }