-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathJenkinsFileIntegration
More file actions
executable file
·29 lines (29 loc) · 982 Bytes
/
JenkinsFileIntegration
File metadata and controls
executable file
·29 lines (29 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
void setBuildStatus(String message, String state) {
step([
$class: "GitHubCommitStatusSetter",
reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/IF-090Java/eSchool"],
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "Integration tests"],
errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]],
statusResultSource: [ $class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]] ]
]);
}
pipeline{
agent any
stages{
stage('Integration testing'){
steps{
withMaven(maven : 'maven3'){
sh 'mvn test -Dtest=academy.softserve.eschool.*.*IntegrationTest'
}
}
}
}
post {
success {
setBuildStatus("Build succeeded", "SUCCESS");
}
failure {
setBuildStatus("Build failed", "FAILURE");
}
}
}