2024-08-29 17:55:24 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
label 'agent1'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
2024-08-29 18:02:04 +00:00
|
|
|
stage('Hello') {
|
2024-08-29 17:55:24 +00:00
|
|
|
steps {
|
|
|
|
// Uruchomienie testów jednostkowych
|
|
|
|
script {
|
2024-08-29 18:04:32 +00:00
|
|
|
echo 'hello world '
|
2024-08-29 17:55:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
// Archiwizacja artefaktów po udanym budowaniu
|
|
|
|
archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
|
|
|
|
failure {
|
|
|
|
// Powiadomienie o nieudanym budowaniu
|
|
|
|
echo 'Build failed!'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|