Update 'Jenkinsfile_dataset_stats'

This commit is contained in:
Tomasz Koszarek 2023-06-30 21:00:21 +02:00
parent e908a521de
commit b3b1ecd987

View File

@ -8,39 +8,30 @@ pipeline {
)
}
stages {
stage('Git Checkout') {
stage('Checkout git clone') {
steps {
git 'https://git.wmi.amu.edu.pl/s487174/ium_z487174.git'
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487174/ium_z487174.git'
}
}
stage('Copy Artifacts') {
stage('Copy dataset artifacts') {
steps {
copyArtifacts(
fingerprintArtifacts: true,
projectName: 'z-s487174-create-dataset',
fingerprintArtifacts: true,
selector: buildParameter('BUILD_SELECTOR')
)
}
}
stage('PullDockerImage') {
steps {
sh 'docker pull jnachyla/stats:3.0 '
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('RunDockerImage') {
stage('Archive file') {
steps {
echo "${pwd()}"
sh "docker run -v ${pwd()}/results:/app/results jnachyla/stats:3.0 "
archiveArtifacts artifacts: 'output.txt', fingerprint: true
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'results/results.txt', onlyIfSuccessful: true
}
}
}
}
}
}