forked from VCNC/haeinsa
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
47 lines (46 loc) · 1.13 KB
/
Jenkinsfile
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
36
37
38
39
40
41
42
43
44
45
46
47
@Library('factual-shared-libs') _
pipeline {
options {
disableConcurrentBuilds()
}
agent {
kubernetes{
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: registry.prod.factual.com/maven-with-thrift:0.14.1
command: ['cat']
tty: true
"""
}
}
triggers {
pollSCM('H/5 * * * *')
}
stages {
stage('Unit Tests') {
steps {
container(name: 'maven') {
withCredentials([file(credentialsId: 'artifactory-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS -U -B clean test'
}
}
}
}
stage ('Deploy Maven') {
when {
branch 'master'
}
steps{
container(name: 'maven') {
withCredentials([file(credentialsId: 'artifactory-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -B -U -s $MAVEN_SETTINGS deploy -DskipTests'
}
}
}
}
}
}