ium_487187/Jenkinsfile

56 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-03-27 20:43:35 +02:00
node {
2023-03-27 21:20:46 +02:00
// stage('Preparation') {
// properties([
// parameters([
// string(
// defaultValue: 'mjaykey',
// description: 'Kaggle username',
// name: 'KAGGLE_USERNAME',
// trim: false
// ),
// password(
// defaultValue: '057cd03e1ed63922f7df5430d3690899',
// description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
// name: 'KAGGLE_KEY'
// )
// ])
// ])
// }
2023-03-27 21:19:42 +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'
sh 'kaggle datasets list'
}
2023-03-22 14:52:10 +01:00
}
2023-03-27 20:43:35 +02:00
stage('Clone Git Repository') {
git 'https://git.wmi.amu.edu.pl/s487187/ium_487187.git'
}
2023-03-27 20:54:26 +02:00
stage('Process Data') {
sh '''
#!/bin/bash
2023-03-27 21:19:42 +02:00
pip install kaggle
2023-03-27 20:54:26 +02:00
2023-03-27 21:19:42 +02:00
export KAGGLE_USERNAME=mjaykey
export KAGGLE_KEY=057cd03e1ed63922f7df5430d3690899
kaggle datasets download nitishsharma01/olympics-124-years-datasettill-2020
unzip -o olympics-124-years-datasettill-2020.zip
2023-03-27 20:54:26 +02:00
echo "Processed Data" > output.txt
cat processed_data.txt >> output.txt
2023-03-27 21:19:42 +02:00
archiveArtifacts 'output.txt'
2023-03-27 20:54:26 +02:00
'''
}
2023-03-27 20:43:35 +02:00
stage('End') {
echo 'Program ended!'
2023-03-27 20:45:56 +02:00
archiveArtifacts 'output.txt'
2023-03-27 20:43:35 +02:00
}
2023-03-22 14:52:10 +01:00
}