File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ pipeline {
1414
1515 environment {
1616 GITLAB_URL = credentials(' gitlab_url' )
17+ MVN_REPO_URL = credentials(' objectbox_internal_mvn_repo_http' )
18+ MVN_REPO_URL_PUBLISH = credentials(' objectbox_internal_mvn_repo' )
19+ MVN_REPO_LOGIN = credentials(' objectbox_internal_mvn_user' )
1720 }
1821
1922 options {
@@ -39,7 +42,9 @@ pipeline {
3942
4043 stage(' build-java' ) {
4144 steps {
42- sh ' ./test-with-asan.sh -Dextensive-tests=true clean test ' +
45+ sh ' ./test-with-asan.sh -Dextensive-tests=true ' +
46+ ' -PinternalObjectBoxRepo=${MVN_REPO_URL} -PinternalObjectBoxRepoUser=${MVN_REPO_LOGIN_USR} -PinternalObjectBoxRepoPassword=${MVN_REPO_LOGIN_PSW} ' +
47+ ' clean test ' +
4348 ' --tests io.objectbox.FunctionalTestSuite ' +
4449 ' --tests io.objectbox.test.proguard.ObfuscatedEntityTest ' +
4550 ' --tests io.objectbox.rx.QueryObserverTest ' +
@@ -49,12 +54,11 @@ pipeline {
4954
5055 stage(' upload-to-repo' ) {
5156 when { expression { return BRANCH_NAME != publishBranch } }
52- environment {
53- MVN_REPO_URL = credentials(' objectbox_internal_mvn_repo' )
54- MVN_REPO_LOGIN = credentials(' objectbox_internal_mvn_user' )
55- }
5657 steps {
57- sh " ./gradlew $gradleArgs -PversionPostFix=${ versionPostfix} -PpreferredRepo=${ MVN_REPO_URL} -PpreferredUsername=${ MVN_REPO_LOGIN_USR} -PpreferredPassword=${ MVN_REPO_LOGIN_PSW} uploadArchives"
58+ sh " ./gradlew $gradleArgs " +
59+ " -PversionPostFix=${ versionPostfix} " +
60+ " -PpreferredRepo=${ MVN_REPO_URL_PUBLISH} -PpreferredUsername=${ MVN_REPO_LOGIN_USR} -PpreferredPassword=${ MVN_REPO_LOGIN_PSW} " +
61+ " uploadArchives"
5862 }
5963 }
6064
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ pipeline {
88
99 environment {
1010 GITLAB_URL = credentials('gitlab_url')
11+ MVN_REPO_URL = credentials('objectbox_internal_mvn_repo_http')
12+ MVN_REPO_LOGIN = credentials('objectbox_internal_mvn_user')
1113 }
1214
1315 options {
@@ -30,7 +32,9 @@ pipeline {
3032
3133 stage('build-java') {
3234 steps {
33- bat 'gradlew cleanTest build test install'
35+ bat 'gradlew ' +
36+ '-PinternalObjectBoxRepo=${MVN_REPO_URL} -PinternalObjectBoxRepoUser=${MVN_REPO_LOGIN_USR} -PinternalObjectBoxRepoPassword=${MVN_REPO_LOGIN_PSW} ' +
37+ 'cleanTest build test'
3438 }
3539 }
3640 }
@@ -43,14 +47,7 @@ pipeline {
4347 archive '**/build/reports/findbugs/*'
4448 }
4549
46- changed {
47- slackSend color: COLOR_MAP[currentBuild.currentResult],
48- message: "Changed to ${currentBuild.currentResult}: ${currentBuild.fullDisplayName}\n${env.BUILD_URL}"
49- }
50-
5150 failure {
52- slackSend color: "danger",
53- message: "Failed: ${currentBuild.fullDisplayName}\n${env.BUILD_URL}"
5451 updateGitlabCommitStatus name: 'build-windows', state: 'failed'
5552 }
5653
Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ uploadArchives.enabled = false
55targetCompatibility = ' 1.7'
66sourceCompatibility = ' 1.7'
77
8+ // Native lib might be deployed only in internal repo
9+ if (project. hasProperty(' internalObjectBoxRepo' )) {
10+ println (" Using internal ObjectBox repository $internalObjectBoxRepo . " )
11+ maven {
12+ credentials {
13+ username project. property(' internalObjectBoxRepoUser' )
14+ password project. property(' internalObjectBoxRepoPassword' )
15+ }
16+ url internalObjectBoxRepo
17+ }
18+ } else {
19+ println " Warning: internalObjectBoxRepo, internalObjectBoxRepoUser and internalObjectBoxRepoPassword missing from gradle.properties."
20+ }
21+
822dependencies {
923 compile project(' :objectbox-java' )
1024 compile ' org.greenrobot:essentials:3.0.0-RC1'
Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ uploadArchives.enabled = false
55sourceCompatibility = 1.7
66targetCompatibility = 1.7
77
8+ // Native lib might be deployed only in internal repo
9+ if (project. hasProperty(' internalObjectBoxRepo' )) {
10+ println (" Using internal ObjectBox repository $internalObjectBoxRepo . " )
11+ maven {
12+ credentials {
13+ username project. property(' internalObjectBoxRepoUser' )
14+ password project. property(' internalObjectBoxRepoPassword' )
15+ }
16+ url internalObjectBoxRepo
17+ }
18+ } else {
19+ println " Warning: internalObjectBoxRepo, internalObjectBoxRepoUser and internalObjectBoxRepoPassword missing from gradle.properties."
20+ }
21+
822dependencies {
923 compile project(' :objectbox-java' )
1024 compile project(' :objectbox-java-api' )
You can’t perform that action at this time.
0 commit comments