ium_464903/Jenkinsfile
2024-03-20 12:49:31 +01:00

57 lines
1.8 KiB
Groovy

pipeline {
agent any
stages {
stage('Preparation') {
steps {
properties([
parameters([
string(
defaultValue: 'jakubbg',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: 'e42b293c818e4ecd7b9365ee037af428',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
])
])
}
}
stage('Build') {
steps {
// Run the maven build
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME'
sh 'kaggle datasets list'
}
}
}
stage('Checkout') {
steps {
// Krok: Sklonowanie repozytorium git
checkout scm
}
}
stage('Execute Shell Script') {
steps {
// Krok: Wywołanie skryptu shella
script {
sh 'chmod +x data_processing_script.sh' // Nadaj uprawnienia do wykonania skryptu
sh './data_processing_script.sh' // Wykonaj skrypt
}
}
}
stage('Archive Artifacts') {
steps {
// Krok: Zarchiwizowanie artefaktów
archiveArtifacts artifacts: 'processed_data/*', fingerprint: true
}
}
}
}