36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
node {
|
|
stage('Preparation') {
|
|
properties([
|
|
parameters([
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
])
|
|
])
|
|
}
|
|
|
|
stage('Git clone') {
|
|
//cloning git repo
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's424714', url: 'https://git.wmi.amu.edu.pl/s424714/ium_424714']]])
|
|
}
|
|
stage('cloning artifacts') {
|
|
//coping artifacts
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's424714-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
|
|
stage('Shell Script') {
|
|
// executing bash scripts
|
|
sh "chmod +x -R ${env.WORKSPACE}"
|
|
sh "./stats-dataset.sh"
|
|
|
|
}
|
|
|
|
stage('Saving artefacts') {
|
|
echo 'Goodbye!'
|
|
archiveArtifacts 'data/stats.txt'
|
|
}
|
|
} |