ium_487194/Jenkinsfile

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2023-03-28 22:11:15 +02:00
node {
stage('Preparation') {
properties([
parameters([
string(
defaultValue: 'witeks1833',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: '',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
])
])
}
2023-03-28 21:21:07 +02:00
stage('checkout: Check out from version control') {
2023-03-28 20:45:54 +02:00
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
extensions: [],
2023-03-28 21:21:07 +02:00
userRemoteConfigs: [[credentialsId: 's487194', url: 'https://git.wmi.amu.edu.pl/s487194/ium_487194']]])
2023-03-28 20:45:54 +02:00
}
2023-03-28 22:44:05 +02:00
2023-03-28 22:11:15 +02:00
stage('Build') {
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
2023-03-28 23:43:39 +02:00
sh 'chmod u+x ./create_dataset.sh'
sh './create_dataset.sh'
2023-03-28 22:44:05 +02:00
archiveArtifacts artifacts: 'Sales.csv'
2023-03-28 22:11:15 +02:00
}
}
2023-03-28 20:15:03 +02:00
}