zadanie doker
This commit is contained in:
parent
7aa5c39258
commit
a82a94a4cc
46
Jenkinsfile
vendored
46
Jenkinsfile
vendored
@ -1,13 +1,37 @@
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
stages {
|
||||
stage('Stage 1') {
|
||||
steps {
|
||||
sh 'chmod u+x ./kagle.py'
|
||||
sh 'python3 kagle.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
agent any
|
||||
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 {
|
||||
stage('Stage 1') {
|
||||
steps {
|
||||
echo 'Hello world!!!'
|
||||
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{
|
||||
agent any
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
parameters {
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
@ -10,9 +12,8 @@ pipeline{
|
||||
stage('copy artefacts') {
|
||||
steps {
|
||||
copyArtifacts filter: 'data.csv', fingerprintArtifacts: true, projectName: 's444386-create-dataset', selector: lastSuccessful()
|
||||
sh "chmod u+x ./dataset_stats.sh"
|
||||
sh "./dataset_stats.sh"
|
||||
archiveArtifacts 'number_of_lines.txt'
|
||||
sh 'chmod u+x ./kagle.py'
|
||||
sh 'python3 kagle.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user