try downloading kaggle dataset
This commit is contained in:
parent
03070c7f4d
commit
1dc3f6b532
47
Jenkinsfile
vendored
47
Jenkinsfile
vendored
@ -1,27 +1,44 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
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'
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Download Dataset') {
|
||||
steps {
|
||||
script {
|
||||
def datasetDir = 'football-semantic-segmentation'
|
||||
sh "mkdir ${datasetDir}"
|
||||
|
||||
// Download the dataset
|
||||
withCredentials([string(value: params.KAGGLE_KEY, variable: 'KAGGLE_API_TOKEN')]) {
|
||||
sh "KAGGLE_CONFIG_DIR=. kaggle datasets download sadhliroomyprime/football-semantic-segmentation -p ${datasetDir}"
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: 'football-semantic-segmentation/**', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
// Clone the public repository
|
||||
git url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Run Python Script') {
|
||||
steps {
|
||||
// Execute the main.py script
|
||||
sh 'python3 main.py'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive Artifacts') {
|
||||
steps {
|
||||
// Archive any artifacts generated by the script
|
||||
// Adjust the path according to your script's output
|
||||
archiveArtifacts artifacts: './football_dataset/*', fingerprint: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user