-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
37 lines (35 loc) · 756 Bytes
/
Jenkinsfile
File metadata and controls
37 lines (35 loc) · 756 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
30
31
32
33
34
35
36
37
pipeline {
agent {
dockerfile {
filename 'Dockerfile.build'
}
}
triggers{
bitbucketPush()
}
environment {
MAVEN_SETTINGS_XML = credentials('smart-inspect-maven-central-settings-xml')
GPG_SECRET_KEY = credentials('smart-inspect-maven-central-pgp-key')
}
stages {
stage('Build artifact') {
steps {
sh '''#!/bin/bash -e
chmod +x mvnw
./mvnw package
'''
}
}
stage('Maven Central release') {
when {
expression { BRANCH_NAME.startsWith('release-') }
}
steps {
sh '''#!/bin/bash -e
gpg --import --batch ${GPG_SECRET_KEY}
./mvnw -s ${MAVEN_SETTINGS_XML} clean deploy
'''
}
}
}
}