ium_z360792/Jenkinsfile_dataset_stats

47 lines
1.2 KiB
Plaintext

pipeline {
agent any
parameters {
buildSelector(
name: 'BUILD_SELECTOR',
description: 'Which build to use for copying artifacts',
defaultSelector: lastSuccessful()
)
}
stages {
stage('Git Checkout') {
steps {
git 'https://git.wmi.amu.edu.pl/s360792/ium_z360792.git'
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts(
fingerprintArtifacts: true,
projectName: 'z-s360792-create-dataset',
selector: buildParameter('BUILD_SELECTOR')
)
}
}
stage('PullDockerImage') {
steps {
sh 'docker pull jnachyla/stats:3.0 '
}
}
stage('RunDockerImage') {
steps {
echo "${pwd()}"
sh "docker run -v ${pwd()}/results:/app/results jnachyla/stats:3.0 "
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'results/results.txt', onlyIfSuccessful: true
}
}
}
}