forked from cyberark/conjur-api-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
64 lines (54 loc) · 1.06 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env groovy
pipeline {
agent { label 'executor-v2' }
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30'))
}
triggers {
cron(getDailyCronString())
}
stages {
stage('Validate') {
parallel {
stage('Changelog') {
steps { sh './bin/parse-changelog.sh' }
}
}
}
stage('Create and archive the Maven package') {
steps {
sh './bin/build.sh'
}
}
stage('Run tests and archive test results') {
steps {
lock("api-java-${env.NODE_NAME}") {
sh './bin/test.sh'
}
junit 'target/surefire-reports/*.xml'
}
}
stage('Perform Snapshot Deployment') {
when {
branch 'main'
}
steps {
sh 'summon ./bin/deploy-snapshot.sh'
}
}
stage('Perform Release Deployment') {
when {
buildingTag()
}
steps {
sh 'summon ./bin/deploy-release.sh'
}
}
}
post {
always {
cleanupAndNotify(currentBuild.currentResult)
}
}
}