forked from objectbox/objectbox-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile-Windows
More file actions
61 lines (50 loc) · 1.91 KB
/
Copy pathJenkinsfile-Windows
File metadata and controls
61 lines (50 loc) · 1.91 KB
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
String buildsToKeep = '500'
String gradleArgs = '-Dorg.gradle.daemon=false --stacktrace'
// https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent { label 'windows' }
environment {
GITLAB_URL = credentials('gitlab_url')
MVN_REPO_URL = credentials('objectbox_internal_mvn_repo_http')
MVN_REPO_LOGIN = credentials('objectbox_internal_mvn_user')
MVN_REPO_ARGS = "-PinternalObjectBoxRepo=$MVN_REPO_URL " +
"-PinternalObjectBoxRepoUser=$MVN_REPO_LOGIN_USR " +
"-PinternalObjectBoxRepoPassword=$MVN_REPO_LOGIN_PSW"
}
options {
buildDiscarder(logRotator(numToKeepStr: buildsToKeep, artifactNumToKeepStr: buildsToKeep))
gitLabConnection("${env.GITLAB_URL}")
}
triggers {
upstream(upstreamProjects: "objectbox-windows/${env.BRANCH_NAME.replaceAll("/", "%2F")}",
threshold: hudson.model.Result.SUCCESS)
}
stages {
stage('init') {
steps {
bat 'gradlew -version'
// "cmd /c" for an OK exit code if no file is found
bat 'cmd /c del tests\\objectbox-java-test\\hs_err_pid*.log'
}
}
stage('build-java') {
steps {
bat "gradlew $gradleArgs $MVN_REPO_ARGS cleanTest build test"
}
}
}
// For global vars see /jenkins/pipeline-syntax/globals
post {
always {
junit '**/build/test-results/**/TEST-*.xml'
archiveArtifacts artifacts: 'tests/*/hs_err_pid*.log', allowEmptyArchive: true // Only on JVM crash.
// currently unused: archiveArtifacts '**/build/reports/findbugs/*'
}
failure {
updateGitlabCommitStatus name: 'build-windows', state: 'failed'
}
success {
updateGitlabCommitStatus name: 'build-windows', state: 'success'
}
}
}