Modifed Jenkisfile and added data.sh
This commit is contained in:
parent
4211e73763
commit
3397cd0901
29
Jenkinsfile
vendored
29
Jenkinsfile
vendored
@ -8,3 +8,32 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
pipeline{
|
||||
agent any
|
||||
properties([parameters([text(defaultValue: '100', description: 'Number of lines to cutoff', name: 'CUT')])])
|
||||
stages{
|
||||
stage('Stage 1'){
|
||||
steps{
|
||||
echo 'Init Jenkins file!'
|
||||
}
|
||||
}
|
||||
stage('checkout: Check out from version control'){
|
||||
steps{
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '87e24204-a0e1-4840-b235-2b993c922d83', url: 'https://git.wmi.amu.edu.pl/s434804/ium_434804']]])
|
||||
}
|
||||
}
|
||||
stage('sh: Shell Script'){
|
||||
steps{
|
||||
withEnv(["CUTOFF=${params.CUT}"])
|
||||
./data.sh
|
||||
}
|
||||
}
|
||||
stage('Archive artifacts'){
|
||||
steps{
|
||||
archiveArtifacts 'test.csv'
|
||||
archiveArtifacts 'validation.csv'
|
||||
archiveArtifacts 'train.csv'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
data
Normal file
8
data
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
curl -OL https://git.wmi.amu.edu.pl/s434804/ium_434804/raw/branch/master/country_vaccinations.csv
|
||||
head -n -1 country_vaccinations.csv | tail -n +$((${CUTOFF}+1)) > country_vaccinations.csv | shuf > vaccines.csv.shuf
|
||||
wc -l vaccines.csv
|
||||
head -n 1468 vaccines.csv.shuf > test.csv
|
||||
head -n 2936 vaccines.csv.shuf | tail -n 1468 > validation.csv
|
||||
tail -n +2936 vaccines.csv.shuf > train.csv
|
||||
wc -l *.csv
|
Loading…
Reference in New Issue
Block a user