iumKC/Jenkinsfile

47 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-03-20 12:47:00 +01:00
pipeline {
2024-03-20 12:51:18 +01:00
agent any
2024-03-26 19:09:12 +01:00
parameters {
string(
defaultValue: 'karol9',
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'
)
}
2024-03-20 12:51:18 +01:00
stages {
2024-03-26 19:09:12 +01:00
stage('Download Dataset') {
2024-03-20 12:51:18 +01:00
steps {
2024-03-26 19:09:12 +01:00
script {
def datasetDir = 'football-semantic-segmentation'
2024-03-26 19:51:03 +01:00
if (!fileExists(datasetDir)) {
sh "mkdir ${datasetDir}"
}
2024-03-26 19:09:12 +01:00
2024-03-26 19:51:03 +01:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "kaggle datasets download sadhliroomyprime/football-semantic-segmentation -p ${datasetDir}"
2024-03-26 19:09:12 +01:00
}
}
}
2024-03-26 19:09:12 +01:00
post {
success {
archiveArtifacts artifacts: 'football-semantic-segmentation/**', onlyIfSuccessful: true
}
}
}
2024-03-26 19:09:12 +01:00
stage('Checkout') {
steps {
2024-03-26 19:51:03 +01:00
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
2024-03-20 12:51:18 +01:00
}
}
}
}
2024-03-26 19:09:12 +01:00