-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
29 lines (29 loc) · 1.43 KB
/
Jenkinsfile
File metadata and controls
29 lines (29 loc) · 1.43 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
pipeline {
agent { label "linux" }
stages {
stage ('compile/test') {
steps {
withMaven(globalMavenSettingsConfig: 'ae44f8b3-3bf7-4624-8e87-74659f3f817f', maven: 'maven3', mavenSettingsConfig: '', traceability: true) {
sh "mvn clean test"
}
}
}
stage ('build/push docker image') {
steps {
withMaven(globalMavenSettingsConfig: 'ae44f8b3-3bf7-4624-8e87-74659f3f817f', maven: 'maven3', mavenSettingsConfig: '', traceability: true) {
sh "mvn package deploy -Dmaven.resources.skip=true -Dmaven.compile.skip=true -Dmaven.testResources.skip=true -Dmaven.testCompile.skip=true -Dmaven.test.skip=true"
}
withDockerRegistry(credentialsId: 'ff14fbff-2a2b-4999-9979-1e31dbdf2786', url: 'http://10.10.60.59:1111') {
sh "docker tag myregsistry:8081/myproject/tomcat 10.10.60.59:1111/myproject/tomcat"
sh "docker push 10.10.60.59:1111/myproject/tomcat"
}
}
}
}
post {
success {
cleanWs cleanWhenAborted: false, cleanWhenFailure: false, cleanWhenNotBuilt: false, cleanWhenUnstable: false
emailext attachLog: true, body: '', compressLog: true, recipientProviders: [upstreamDevelopers()], subject: 'Wir haben ein Problem ${env.JOB_NAME}', to: 'thomas@mosig-frey.de'
}
}
}