ium_464903/Jenkinsfile

57 lines
1.8 KiB
Plaintext
Raw Normal View History

2024-03-20 11:17:00 +01:00
pipeline {
2024-03-20 12:11:18 +01:00
agent any
2024-03-20 12:34:32 +01:00
2024-03-20 12:11:18 +01:00
stages {
2024-03-20 12:43:09 +01:00
stage('Preparation') {
2024-03-20 12:46:12 +01:00
steps {
2024-03-20 12:56:01 +01:00
script {
2024-03-20 12:43:09 +01:00
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'
)
2024-03-20 12:49:31 +01:00
])
2024-03-20 12:46:12 +01:00
}
2024-03-20 12:56:01 +01:00
}
2024-03-20 12:43:09 +01:00
}
stage('Build') {
2024-03-20 12:46:12 +01:00
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'
}
2024-03-20 12:43:09 +01:00
}
}
2024-03-20 12:34:32 +01:00
stage('Checkout') {
2024-03-20 12:11:18 +01:00
steps {
2024-03-20 12:34:32 +01:00
// 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
2024-03-20 12:11:18 +01:00
}
}
}
2024-03-20 12:22:50 +01:00
}