ium_z487174/Jenkinsfile_dataset_stats

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-06-30 00:47:31 +02:00
pipeline {
agent any
parameters {
buildSelector(
name: 'BUILD_SELECTOR',
description: 'Which build to use for copying artifacts',
defaultSelector: lastSuccessful()
)
}
stages {
2023-06-30 21:00:21 +02:00
stage('Checkout git clone') {
2023-06-30 00:47:31 +02:00
steps {
2023-06-30 21:00:21 +02:00
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487174/ium_z487174.git'
2023-06-30 00:47:31 +02:00
}
}
2023-06-30 21:00:21 +02:00
stage('Copy dataset artifacts') {
2023-06-30 00:47:31 +02:00
steps {
copyArtifacts(
projectName: 'z-s487174-create-dataset',
2023-06-30 21:00:21 +02:00
fingerprintArtifacts: true,
2023-06-30 00:47:31 +02:00
selector: buildParameter('BUILD_SELECTOR')
)
}
}
2023-06-30 21:00:21 +02:00
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"'
2023-06-30 00:47:31 +02:00
}
}
2023-06-30 21:00:21 +02:00
stage('Archive file') {
2023-06-30 00:47:31 +02:00
steps {
2023-06-30 21:00:21 +02:00
archiveArtifacts artifacts: 'output.txt', fingerprint: true
2023-06-30 00:47:31 +02:00
}
2023-06-30 21:00:21 +02:00
}
2023-06-30 00:47:31 +02:00
}
2023-06-30 21:00:21 +02:00
}