Add new jenkinsfile for dataset stats
This commit is contained in:
parent
40f77b27d6
commit
f9e12e8e3c
26
Jenkinsfile2
Normal file
26
Jenkinsfile2
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
node {
|
||||||
|
stage('Preparation') {
|
||||||
|
properties([parameters([
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR')
|
||||||
|
])])
|
||||||
|
}
|
||||||
|
stage('Clone repository') {
|
||||||
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: '5e0a58a0-03ad-41dd-beff-7b8a07c7fe0c', url: 'https://git.wmi.amu.edu.pl/s444452/ium_444452.git']]])
|
||||||
|
}
|
||||||
|
stage('Copy artifacts') {
|
||||||
|
copyArtifacts filter: 'dataset.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||||
|
}
|
||||||
|
stage('Run script') {
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
|
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||||
|
sh "chmod u+x ./dataset_stats.sh"
|
||||||
|
sh "./dataset_stats.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Archive artifacts') {
|
||||||
|
archiveArtifacts 'stats.txt'
|
||||||
|
}
|
||||||
|
}
|
3
dataset_stats.sh
Normal file
3
dataset_stats.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
wc -l dataset.csv > stats.txt
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
kaggle datasets download -d shivamb/real-or-fake-fake-jobposting-prediction
|
kaggle datasets download -d shivamb/real-or-fake-fake-jobposting-prediction
|
||||||
ls
|
|
||||||
unzip -oc real-or-fake-fake-jobposting-prediction.zip | shuf | head -n $1 > dataset.csv
|
unzip -oc real-or-fake-fake-jobposting-prediction.zip | shuf | head -n $1 > dataset.csv
|
Loading…
Reference in New Issue
Block a user