IUM_03 - update Jenkinsfile, add pipeline for downloading dataset from kaggle
This commit is contained in:
parent
563e205f2d
commit
597432d618
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@ -1,9 +1,37 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
parameters {
|
||||
password (
|
||||
name: 'KAGGLE_USERNAME',
|
||||
defaultValue: '',
|
||||
description: 'Kaggle username'
|
||||
),
|
||||
password (
|
||||
name: 'KAGGLE_KEY',
|
||||
defaultValue: '',
|
||||
description: 'Kaggle API key'
|
||||
),
|
||||
number (
|
||||
name: 'CUTOFF',
|
||||
defaultValue: '10',
|
||||
description: 'Get only the first CUTOFF rows of the dataset'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Stage 1') {
|
||||
stage('Clone repository') {
|
||||
steps {
|
||||
echo 'Hello world!'
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
stage('Download dataset') {
|
||||
steps {
|
||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||
sh './download_dataset.sh ${params.CUTOFF}'
|
||||
archiveArtifacts artifacts: 'data.csv', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
download_dataset.sh
Normal file
4
download_dataset.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
kaggle datasets download -d uciml/breast-cancer-wisconsin-data
|
||||
unzip -o breast-cancer-wisconsin-data.zip
|
||||
head -n "$1" data.csv > data.csv.tmp && mv data.csv.tmp data.csv
|
1
get_stats.sh
Normal file
1
get_stats.sh
Normal file
@ -0,0 +1 @@
|
||||
# TODO
|
Loading…
Reference in New Issue
Block a user