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 @@ -134,11 +134,19 @@ publishing {
134134 }
135135 repositories {
136136 maven {
137- name = " central"
138- url = mavenCentralUrl
139- credentials {
140- username mavenCentralUsername
141- password mavenCentralPassword
137+ if (project. hasProperty(" mavenUser" )) {
138+ credentials {
139+ username mavenUser
140+ password mavenPassword
141+ }
142+ url publishUrl
143+ } else {
144+ name = " central"
145+ url = mavenCentralUrl
146+ credentials {
147+ username mavenCentralUsername
148+ password mavenCentralPassword
149+ }
142150 }
143151 }
144152 }
You can’t perform that action at this time.
0 commit comments