38 lines
1.2 KiB
Plaintext
38 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/s487174/ium_z487174.git'
|
|
}
|
|
}
|
|
stage('Copy dataset artifacts') {
|
|
steps {
|
|
copyArtifacts(
|
|
projectName: 'z-s487174-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 tomkos5/ium:v1 sh -c "chmod 777 /app/s487174-dataset-stats.sh > output.txt"'
|
|
}
|
|
}
|
|
stage('Archive file') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'output.txt', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
}
|