update jenkisfile
This commit is contained in:
parent
78636092b9
commit
43b7355ae8
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
@ -1,41 +1,46 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
parameters {
|
||||||
|
string(
|
||||||
|
defaultValue: 'nbrt10',
|
||||||
|
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'
|
||||||
|
)
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Preparation') {
|
stage('Preparation') {
|
||||||
properties([
|
steps {
|
||||||
//dostęp do API KAGGLE
|
script {
|
||||||
parameters([
|
// Ustawianie danych uwierzytelniających KAGGLE
|
||||||
string(
|
withCredentials([string(credentialsId: '', variable: 'KAGGLE_USERNAME'), string(credentialsId: '', variable: 'KAGGLE_KEY')]) {
|
||||||
defaultValue: 'nbrt10',
|
sh 'export KAGGLE_USERNAME=$KAGGLE_USERNAME && export KAGGLE_KEY=$KAGGLE_KEY'
|
||||||
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'
|
|
||||||
)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
stage('checkout') {
|
stage('checkout') {
|
||||||
steps {
|
steps {
|
||||||
//Klonowanie
|
//Klonowanie
|
||||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'git-creds', url: 'https://git.wmi.amu.edu.pl/s487175/ium_z487175.git']]])
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'git-creds', url: 'https://git.wmi.amu.edu.pl/s487175/ium_z487175.git']]])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('script') {
|
stage('script') {
|
||||||
steps {
|
steps {
|
||||||
//skrypt
|
//skrypt
|
||||||
sh './s487175-create-dataset-scriptsh.py' > output.txt
|
sh './s487175-create-dataset-scriptsh.py > output.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
//archiveArtifacts
|
//archiveArtifacts
|
||||||
archiveArtifacts artifacts: 'output.txt', onlyIfSuccessful: true
|
archiveArtifacts artifacts: 'output.txt', onlyIfSuccessful: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user