This repository was archived by the owner on Sep 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,22 @@ pipeline{
2525 '''
2626 junit ' **/build/**/*.xml'
2727 }
28+ }
29+ stage(' publish' ){
30+ when {
31+ branch ' develop'
32+
33+ }
34+ steps{
35+ sh label :' publish' , script : ''' #!/bin/bash
36+ export JAVA_HOME=$JAVA_HOME_DIR
37+ export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR
38+ export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH
39+ cp ~/.gradle/gradle.properties $GRADLE_USER_HOME;
40+ cd ml-app-deployer
41+ ./gradlew publish
42+ '''
43+ }
2844 }
2945 }
3046}
Original file line number Diff line number Diff line change @@ -143,11 +143,19 @@ publishing {
143143 }
144144 repositories {
145145 maven {
146- name = " central"
147- url = mavenCentralUrl
148- credentials {
149- username mavenCentralUsername
150- password mavenCentralPassword
146+ if (project. hasProperty(" mavenUser" )) {
147+ credentials {
148+ username mavenUser
149+ password mavenPassword
150+ }
151+ url publishUrl
152+ } else {
153+ name = " central"
154+ url = mavenCentralUrl
155+ credentials {
156+ username mavenCentralUsername
157+ password mavenCentralPassword
158+ }
151159 }
152160 }
153161 }
You can’t perform that action at this time.
0 commit comments