ium_487194/Jenkinsfile

39 lines
1.3 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}" ]) {
2023-03-28 22:32:18 +02:00
sh 'kaggle datasets download -d sadiqshah/bike-sales-in-europe'
2023-03-28 22:11:15 +02:00
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
2023-03-28 22:58:29 +02:00
sh 'chmod u+x ./Downloads_Sales.sh'
sh './Downloads_Sales.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
}