27 lines
1.0 KiB
Plaintext
27 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('Clone repository') {
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: '5e0a58a0-03ad-41dd-beff-7b8a07c7fe0c', url: 'https://git.wmi.amu.edu.pl/s444452/ium_444452.git']]])
|
|
}
|
|
stage('Copy artifacts') {
|
|
copyArtifacts filter: 'dataset.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
stage('Run script') {
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
|
sh "chmod u+x ./dataset_stats.sh"
|
|
sh "./dataset_stats.sh"
|
|
}
|
|
}
|
|
stage('Archive artifacts') {
|
|
archiveArtifacts 'stats.txt'
|
|
}
|
|
}
|