This commit is contained in:
Jakub Zaręba 2023-05-23 22:03:38 +02:00
parent e7907303fc
commit ac6a33caf2

49
JenkinsfileDVC Normal file
View File

@ -0,0 +1,49 @@
pipeline {
agent any
tools {
git 'default'
dvc 'default'
}
stages {
stage('Clone Repository') {
steps {
try {
git 'https://git.wmi.amu.edu.pl/s487187/ium_487187.git'
} catch (err) {
error "Failed to clone repository: ${err.message}"
}
}
}
stage('Create dvc.yaml') {
steps {
writeFile file: 'dvc.yaml', text: '''
stages:
prepare:
cmd: python prepare_data.py
deps:
- raw_data.csv
outs:
- processed_data.csv
'''
sh 'git add dvc.yaml'
sh 'git commit -m "Add dvc.yaml"'
sh 'git push origin HEAD'
}
}
stage('Pull DVC Files') {
steps {
sh 'dvc pull'
}
}
stage('Run DVC Pipeline') {
steps {
sh 'dvc reproduce'
}
}
}
}