ium_487187/Jenkinsfile

49 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-03-27 20:43:35 +02:00
node {
2023-03-27 21:22:53 +02:00
stage('Clone Git Repository') {
git 'https://git.wmi.amu.edu.pl/s487187/ium_487187.git'
}
2023-03-27 21:21:24 +02:00
stage('Preparation') {
properties([
parameters([
string(
defaultValue: '',
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-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'
2023-03-27 21:22:53 +02:00
sh '''
#!/bin/bash
pip install kaggle
2023-03-27 20:43:35 +02:00
2023-03-27 21:22:53 +02:00
kaggle datasets download nitishsharma01/olympics-124-years-datasettill-2020
2023-03-27 20:43:35 +02:00
2023-03-27 21:22:53 +02:00
unzip -o olympics-124-years-datasettill-2020.zip
2023-03-27 21:19:42 +02:00
2023-03-27 21:22:53 +02:00
echo "Processed Data" > output.txt
cat processed_data.txt >> output.txt
2023-03-27 21:19:42 +02:00
2023-03-27 21:22:53 +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
}