Jenkisfile2
This commit is contained in:
parent
baa683d209
commit
769c2d731f
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -35,8 +35,6 @@ pipeline {
|
|||||||
archiveArtifacts 'TEST_winequality-red.csv'
|
archiveArtifacts 'TEST_winequality-red.csv'
|
||||||
archiveArtifacts 'TRAIN_winequality-red.csv'
|
archiveArtifacts 'TRAIN_winequality-red.csv'
|
||||||
archiveArtifacts 'VAL_winequality-red.csv'
|
archiveArtifacts 'VAL_winequality-red.csv'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
60
Jenkinsfile2
60
Jenkinsfile2
@ -1,37 +1,27 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
parameters {
|
parameters{
|
||||||
string(
|
buildSelector(
|
||||||
defaultValue: 'sknera',
|
defaultSelector: lastSuccessful(),
|
||||||
description: 'username',
|
name: 's444354-create-dataset',
|
||||||
name: 'USERNAME',
|
description: 'Which build to use for copying artifacts'
|
||||||
trim: false
|
)
|
||||||
)
|
|
||||||
password(
|
}
|
||||||
defaultValue: '',
|
|
||||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
stages {
|
||||||
name: 'KAGGLE_KEY'
|
stage("Check out from version control") {
|
||||||
)
|
steps {
|
||||||
string(
|
checkout scm
|
||||||
defaultValue: '20',
|
}
|
||||||
description: 'Value for head command',
|
}
|
||||||
name: 'CUTOFF'
|
stage("Shell Script") {
|
||||||
)
|
steps {
|
||||||
}
|
sh "chmod u+x ./script2.sh"
|
||||||
environment {
|
sh " ./script2.sh"
|
||||||
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
archiveArtifacts 'num_of_lines.txt'
|
||||||
KAGGLE_KEY="$params.KAGGLE_KEY"
|
|
||||||
CUTOFF="$params.CUTOFF"
|
}
|
||||||
}
|
}
|
||||||
stages {
|
}
|
||||||
stage('Stage 1') {
|
|
||||||
steps {
|
|
||||||
echo 'Hello world'
|
|
||||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s444354/ium_444354']]])
|
|
||||||
sh "chmod u+x ./dataset_download.sh"
|
|
||||||
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./download.sh"
|
|
||||||
archiveArtifacts 'data.txt'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
4
script2.sh
Normal file
4
script2.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
wc -l > num_of_lines.txt
|
Loading…
Reference in New Issue
Block a user