-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
44 lines (44 loc) · 1.45 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
pipeline {
agent none
environment {
GRADLE_ARGS = '--no-daemon'
}
stages {
stage('gradle') {
agent {
docker {
image 'gradle:jdk11'
args '-v mmmsgc:/home/gradle/.gradle/'
}
}
environment {
MMMS_MAVEN = credentials('nexus-mmms')
}
steps {
sh './gradlew ${GRADLE_ARGS} --continue clean test build'
}
post {
success {
archiveArtifacts artifacts: 'source/api/build/distributions/api-boot.tar', fingerprint: true
archiveArtifacts artifacts: 'source/*/build/libs/*.jar', fingerprint: true
sh './gradlew ${GRADLE_ARGS} -PmmmsMavenUser=${MMMS_MAVEN_USR} -PmmmsMavenPassword=${MMMS_MAVEN_PSW} publish'
}
}
}
}
post {
success {
node(null)
{
script {
if (env.BRANCH_NAME == 'master') {
docker.image('tmaier/docker-compose:latest').inside('-v /var/run/docker.sock:/var/run/docker.sock')
{
sh '/usr/bin/docker-compose --no-ansi --project-name mmms -f ./docker-compose.yaml up -d --build --force-recreate --remove-orphans'
}
}
}
}
}
}
}