ium_487187/Jenkinsfile
Jakub Zaręba b696bd2ca7 t
2023-03-27 21:36:51 +02:00

51 lines
1.5 KiB
Groovy

node {
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'
)
])
])
}
stage('Build') {
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh '''
#!/bin/bash
pip install kaggle
kaggle datasets download nitishsharma01/olympics-124-years-datasettill-2020
unzip olympics-124-years-datasettill-2020.zip
echo "Processed Data" > output.txt
cat processed_data.txt >> output.txt
'''
}
}
stage('Clone Git Repository') {
git 'https://git.wmi.amu.edu.pl/s487187/ium_487187.git'
}
stage('End') {
echo 'Program ended!'
}
post {
always {
archiveArtifacts 'output.txt'
}
}
}