forked from buildpacks/sample-java-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
35 lines (26 loc) · 1.06 KB
/
Copy pathJenkinsfile
File metadata and controls
35 lines (26 loc) · 1.06 KB
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
30
31
32
33
34
35
pipeline {
agent { label 'slave1' }
tools {
// Install the Maven version configured as "M3" and add it to the path.
maven "maven3.9.8"
}
//sample change to trigger pipeline
stages {
stage('Build') {
steps {
// Get some code from a GitHub repository
git branch: 'main', credentialsId: 'github_ssh_abrzyski92', url: 'https://github.com/abrzyski92/sample-java-app.git'
// Run Maven on a Unix agent.
sh "mvn -Dmaven.test.failure.ignore=true clean package"
sh 'echo "SUCCESS"'
}
post {
// If Maven was able to run the tests, even if some of the test
// failed, record the test results and archive the jar file.
success {
mail bcc: '', body: 'sample_body', cc: '', from: '', replyTo: '', subject: 'Jenkis Pipeline Notification', to: 'abrzyski92@gmail.com'
}
}
}
}
}