zadanie doker
This commit is contained in:
parent
7aa5c39258
commit
a82a94a4cc
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@ -1,12 +1,36 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
dockerfile true
|
parameters {
|
||||||
|
string(
|
||||||
|
defaultValue: 'szymonjadczak',
|
||||||
|
description: 'Kaggle username',
|
||||||
|
name: 'KAGGLE_USERNAME',
|
||||||
|
trim: false
|
||||||
|
)
|
||||||
|
password(
|
||||||
|
defaultValue: '',
|
||||||
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
|
name: 'KAGGLE_KEY'
|
||||||
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: '',
|
||||||
|
description: 'Value for head command',
|
||||||
|
name: 'CUTOFF'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
||||||
|
KAGGLE_KEY="$params.KAGGLE_KEY"
|
||||||
|
CUTOFF="$params.CUTOFF"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Stage 1') {
|
stage('Stage 1') {
|
||||||
steps {
|
steps {
|
||||||
sh 'chmod u+x ./kagle.py'
|
echo 'Hello world!!!'
|
||||||
sh 'python3 kagle.py'
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s444386/ium_444386']]])
|
||||||
|
sh "chmod u+x ./dataset_download.sh"
|
||||||
|
sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./dataset_download.sh"
|
||||||
|
archiveArtifacts 'data.csv'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
pipeline{
|
pipeline{
|
||||||
agent any
|
agent {
|
||||||
|
dockerfile true
|
||||||
|
}
|
||||||
parameters {
|
parameters {
|
||||||
buildSelector(
|
buildSelector(
|
||||||
defaultSelector: lastSuccessful(),
|
defaultSelector: lastSuccessful(),
|
||||||
@ -10,9 +12,8 @@ pipeline{
|
|||||||
stage('copy artefacts') {
|
stage('copy artefacts') {
|
||||||
steps {
|
steps {
|
||||||
copyArtifacts filter: 'data.csv', fingerprintArtifacts: true, projectName: 's444386-create-dataset', selector: lastSuccessful()
|
copyArtifacts filter: 'data.csv', fingerprintArtifacts: true, projectName: 's444386-create-dataset', selector: lastSuccessful()
|
||||||
sh "chmod u+x ./dataset_stats.sh"
|
sh 'chmod u+x ./kagle.py'
|
||||||
sh "./dataset_stats.sh"
|
sh 'python3 kagle.py'
|
||||||
archiveArtifacts 'number_of_lines.txt'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user