ium_z487175/Jenkinsfile-dataset-stats
2023-04-18 18:02:59 +02:00

37 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('Checkout git clone') {
steps {
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487175/ium_z487175.git'
}
}
stage('Copy dataset artifacts') {
steps {
copyArtifacts(
projectName: 'z-s487175-create-dataset',
fingerprintArtifacts: true,
selector: buildParameter('BUILD_SELECTOR')
)
}
}
stage('Run a shell script in a docker container') {
steps {
// Uruchomienie kontenera Docker i przekazanie wyniku do pliku na hoście
sh 'docker run -v "$(pwd)":/app nbrt10/ium:v1 sh -c "chmod 777 /app/s487175-dataset-stats-script.sh && /app/s487175-dataset-stats-script.sh > output.txt"'
}
}
stage('Archive file') {
steps {
archiveArtifacts artifacts: 'output.txt', fingerprint: true
}
}
}
}