@@ -4,48 +4,48 @@ node('rhel7'){
44 def recipientList
= ' [email protected] ' 55 def javaHome = tool ' openjdk-11'
66 env. JAVA_HOME = " ${ javaHome} "
7-
7+
88 try {
99 stage(' Checkout repo' ) {
1010 deleteDir()
1111 git url : ' https://github.com/redhat-developer/intellij-dependency-analytics' ,
1212 branch : " ${ sha1} "
1313 }
14-
14+
1515 def props = readProperties file : ' gradle.properties'
1616 def isSnapshot = props[' projectVersion' ]. contains(' -SNAPSHOT' )
1717 def version = isSnapshot? props[' projectVersion' ]. replace(' -SNAPSHOT' , " .${ env.BUILD_NUMBER} " ): props[' projectVersion' ] + " .${ env.BUILD_NUMBER} "
18-
18+
1919 stage(' Build' ) {
2020 sh " ./gradlew assemble -PprojectVersion=${ version} "
2121 }
22-
22+
2323 stage(' Package' ) {
2424 sh " ./gradlew buildPlugin -PprojectVersion=${ version} "
2525 }
26-
26+
2727 if (params. UPLOAD_LOCATION ) {
2828 stage(' Upload' ) {
2929 def filesToPush = findFiles(glob : ' **/*.zip' )
3030 sh " sftp -C ${ UPLOAD_LOCATION} /snapshots/intellij-dependency-analytics/ <<< \$ 'put -p \" ${ filesToPush[0].path} \" '"
3131 stash name :' zip' , includes :filesToPush[0 ]. path
3232 }
3333 }
34-
34+
3535 if (publishToMarketPlace. equals(' true' )){
3636 timeout(time :5 , unit :' DAYS' ) {
37- input message :' Approve deployment?' , submitter : ' jmaury'
37+ input message :' Approve deployment?' , submitter : ' jmaury, tfigenbl '
3838 }
39-
39+
4040 def channel = isSnapshot? " nightly" : " stable"
41-
41+
4242 stage(" Publish to Marketplace" ) {
4343 unstash ' zip'
4444 withCredentials([[$class : ' StringBinding' , credentialsId : ' JetBrains marketplace token' , variable : ' TOKEN' ]]) {
4545 sh " ./gradlew publishPlugin -PjetBrainsToken=${ TOKEN} -PprojectVersion=${ version} -PjetBrainsChannel=${ channel} "
4646 }
4747 archive includes :" **.zip"
48-
48+
4949 if (! isSnapshot) {
5050 stage(" Promote the build to stable" ) {
5151 def zip = findFiles(glob : ' **/*.zip' )
0 commit comments