num lines script

This commit is contained in:
s444417 2022-03-24 21:26:43 +01:00
parent 92f6c8be62
commit 9d14f68033
5 changed files with 31 additions and 1 deletions

1
.gitignore vendored
View File

@ -217,3 +217,4 @@ fabric.properties
/Participants_Data_HPP/
/Participants_Data_HPP/*
kaggle.json

2
Jenkinsfile vendored
View File

@ -30,7 +30,7 @@ pipeline {
stage("Shell Scripts") {
steps {
sh "chmod u+x ./startscript.sh"
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript.sh"
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript1.sh"
archiveArtifacts 'data.txt'
}
}

26
Jenkinsfile2 Normal file
View File

@ -0,0 +1,26 @@
pipeline {
agent any
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
name: 's444417-create-dataset',
description: 'Which build to use for copying artifacts'
)
}
stages {
stage("Check out from version control") {
steps {
checkout scm
}
}
stage("Shell Script") {
steps {
sh "chmod u+x ./script2.sh"
sh " ./script2.sh"
archiveArtifacts 'num_lines.txt'
}
}
}
}

View File

@ -1,3 +1,4 @@
#!/bin/sh
kaggle datasets download -d akash14/house-price-dataset
unzip -o house-price-dataset.zip
head -n $CUTOFF ./Participants_Data_HPP/Train.csv >> data.txt

2
startscript2.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
wc -l data.txt > num_lines.txt