f
This commit is contained in:
parent
aa49a91652
commit
7178de7d3a
36
Jenkinsfile
vendored
36
Jenkinsfile
vendored
@ -1,6 +1,28 @@
|
|||||||
node {
|
node {
|
||||||
stage('Start') {
|
stage('Preparation') {
|
||||||
echo "Program Started"
|
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'
|
||||||
|
)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
}
|
||||||
|
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'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Clone Git Repository') {
|
stage('Clone Git Repository') {
|
||||||
@ -10,13 +32,19 @@ node {
|
|||||||
stage('Process Data') {
|
stage('Process Data') {
|
||||||
sh '''
|
sh '''
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
pip install kaggle
|
||||||
|
|
||||||
wget https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data
|
export KAGGLE_USERNAME=mjaykey
|
||||||
|
export KAGGLE_KEY=057cd03e1ed63922f7df5430d3690899
|
||||||
|
|
||||||
shuf iris.data | head -n 10 > processed_data.txt
|
kaggle datasets download nitishsharma01/olympics-124-years-datasettill-2020
|
||||||
|
|
||||||
|
unzip -o olympics-124-years-datasettill-2020.zip
|
||||||
|
|
||||||
echo "Processed Data" > output.txt
|
echo "Processed Data" > output.txt
|
||||||
cat processed_data.txt >> output.txt
|
cat processed_data.txt >> output.txt
|
||||||
|
|
||||||
|
archiveArtifacts 'output.txt'
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user