45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
pipeline {
|
|
agent any
|
|
parameters {
|
|
string(
|
|
defaultValue: 'kamilab0bkowska',
|
|
description: 'kaggle username',
|
|
name: 'KAGGLE_USERNAME',
|
|
trim: false
|
|
)
|
|
password(
|
|
defaultValue: '',
|
|
description: 'kaggle passowrd',
|
|
name: 'KAGGLE_KEY'
|
|
)
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage('Stage 1') {
|
|
steps {
|
|
echo 'Hello world but for the second time!'
|
|
}
|
|
}
|
|
|
|
stage('Copy and proceed') {
|
|
steps {
|
|
copyArtifacts filter: 'apps_*.csv', fingerprintArtifacts: true, projectName: 's444517-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
sh 'chmod +x -R ./data_stats.sh'
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
|
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
|
|
sh './data_stats.sh'
|
|
archiveArtifacts artifacts: 'stats.txt'
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|