Update Jenkinsfile
This commit is contained in:
parent
cb236969d4
commit
16750b5831
26
Jenkinsfile
vendored
26
Jenkinsfile
vendored
@ -1,9 +1,31 @@
|
||||
pipeline {
|
||||
agent any
|
||||
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'
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage('Stage 1') {
|
||||
stage('Check out from version control') {
|
||||
steps {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]])
|
||||
}
|
||||
}
|
||||
stage('Shell Script') {
|
||||
steps {
|
||||
echo 'Hello world!'
|
||||
sh 'chmod u+x ./download_data.sh'
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}","KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
||||
sh './download_data.sh'
|
||||
}
|
||||
archiveArtifacts 'travel_insurance_data.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
download_data.sh
Normal file
3
download_data.sh
Normal file
@ -0,0 +1,3 @@
|
||||
kaggle datasets download -d tejashvi14/travel-insurance-prediction-data
|
||||
unzip -o travel-insurance-prediction-data.zip
|
||||
head -n 15 TravelInsurancePrediction.csv >> travel_insurance_data.txt
|
Loading…
Reference in New Issue
Block a user