-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jenkinsfile
64 lines (64 loc) · 2.25 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
pipeline {
agent {
docker {
image 'ghcr.io/cloud-taddiken-online/build-java:21-jdk'
args '-v /home/jenkins/caches/restrict-imports/.m2:/home/jenkins/.m2:rw -v /home/jenkins/caches/restrict-imports/.gradle:/tmp/gradle-user-home:rw -v /home/jenkins/.gnupg:/.gnupg:ro'
}
}
environment {
COVERALLS_REPO_TOKEN = credentials('coveralls_repo_token_restrict_imports_rule')
BUILD_CACHE = credentials('build_cache')
GRADLE_CACHE = '/tmp/gradle-user-home'
GRADLE_USER_HOME = '/home/jenkins/.gradle'
MAVEN_CONFIG = ''
ORG_GRADLE_PROJECT_sonatype = credentials('SONATYPE_NEXUS')
ORG_GRADLE_PROJECT_signingPassword = credentials('gpg_password')
ORG_GRADLE_PROJECT_base64EncodedAsciiArmoredSigningKey = credentials('gpg_private_key')
}
stages {
stage('Load Gradle Cache from host') {
steps {
// Copy the Gradle cache from the host, so we can write to it
sh "rsync -a --include /jdks --include /caches --include /wrapper --exclude '/*' ${GRADLE_CACHE}/ ${GRADLE_USER_HOME} || true"
}
}
stage('Quickcheck') {
steps {
withGradle {
sh './gradlew quickCheck'
}
}
}
stage('Unit-tests') {
steps {
withGradle {
sh './gradlew test coveralls'
}
}
}
stage('Func-tests') {
steps {
withGradle {
sh './gradlew functionalTest'
}
}
}
stage('readme') {
steps {
withGradle {
sh './gradlew generateReadmeAndReleaseNotes'
}
}
}
}
post {
success {
// Write updates to the Gradle cache back to the host
sh "rsync -au ${GRADLE_USER_HOME}/jdks ${GRADLE_USER_HOME}/caches ${GRADLE_USER_HOME}/wrapper ${GRADLE_CACHE}/ || true"
}
always {
archiveArtifacts(artifacts: '*.md')
junit (testResults: '**/build/test-results/test/**.xml,**/build/*/reports/**.xml', allowEmptyResults: true)
}
}
}