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 20:15:03 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2023-03-28 21:21:07 +02:00
|
|
|
stage('checkout: Check out from version control') {
|
2023-03-28 20:45:54 +02:00
|
|
|
steps {
|
|
|
|
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 20:15:03 +02:00
|
|
|
stage('Stage 1') {
|
|
|
|
steps {
|
|
|
|
echo 'Hello world!'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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:32:18 +02:00
|
|
|
sh 'chmod u+x ./Downloads_sales.sh'
|
|
|
|
sh './Downloads_sales.sh'
|
2023-03-28 22:11:15 +02:00
|
|
|
}
|
|
|
|
}
|
2023-03-28 20:15:03 +02:00
|
|
|
}
|