@@ -106,9 +106,9 @@ node('rhel8'){
106
106
node(' rhel8' ){
107
107
sh ' npm install -g --force "@vscode/vsce"'
108
108
sh ' npm install -g "ovsx"'
109
- if (publishToMarketPlace. equals(' true' ) || publishPreRelease. equals(' true' )){
109
+ if (publishToMarketPlace. equals(' true' ) || publishToOVSX . equals( ' true ' ) || publishPreRelease. equals(' true' )){
110
110
111
- if (publishToMarketPlace. equals(' true' )) {
111
+ if (publishToMarketPlace. equals(' true' ) || publishToOVSX . equals( ' true ' ) ) {
112
112
timeout(time :2 , unit :' DAYS' ) {
113
113
input message :' Approve deployment?' , submitter : ' fbricon,rgrunber,azerr,davthomp'
114
114
}
@@ -117,22 +117,29 @@ node('rhel8'){
117
117
stage " Publish to Marketplaces"
118
118
unstash ' vsix'
119
119
def vsix = findFiles(glob : ' **.vsix' )
120
+ def platformVsixes = findFiles(glob : ' **.vsix' , excludes : vsix[0 ]. path)
121
+
120
122
// VS Code Marketplace
121
- withCredentials([[$class : ' StringBinding' , credentialsId : ' vscode_java_marketplace' , variable : ' TOKEN' ]]) {
122
- def platformVsixes = findFiles(glob : ' **.vsix' , excludes : vsix[0 ]. path)
123
- for (platformVsix in platformVsixes){
124
- sh ' vsce publish -p ${TOKEN}' + " --packagePath ${ platformVsix.path} "
123
+ if (publishToMarketPlace. equals(' true' ) || publishPreRelease. equals(' true' )) {
124
+ withCredentials([[$class : ' StringBinding' , credentialsId : ' vscode_java_marketplace' , variable : ' TOKEN' ]]) {
125
+ for (platformVsix in platformVsixes){
126
+ sh ' vsce publish -p ${TOKEN}' + " --packagePath ${ platformVsix.path} "
127
+ }
128
+ // Cannot combine packagePath & target, so re-generate (generic) package and publish
129
+ sh ' vsce publish -p ${TOKEN}' + " ${ env.publishPreReleaseFlag} "
125
130
}
126
- // Cannot combine packagePath & target, so re-generate (generic) package and publish
127
- sh ' vsce publish -p ${TOKEN} --target win32-ia32 win32-arm64 linux-arm64 linux-armhf alpine-x64 alpine-arm64' + " ${ env.publishPreReleaseFlag} "
128
131
}
129
132
130
- if (publishToMarketPlace . equals( ' true ' )) {
131
- // Open-VSX Marketplace does not support pre-release
133
+ // Open-VSX Marketplace
134
+ if (publishToOVSX . equals( ' true ' ) || publishPreRelease . equals( ' true ' )) {
132
135
withCredentials([[$class : ' StringBinding' , credentialsId : ' open-vsx-access-token' , variable : ' OVSX_TOKEN' ]]) {
133
- sh ' ovsx publish -p ${OVSX_TOKEN}' + " ${ vsix[0].path} "
136
+ for (platformVsix in platformVsixes){
137
+ sh ' ovsx publish -p ${OVSX_TOKEN}' + " --packagePath ${ platformVsix.path} "
138
+ }
139
+
140
+ sh ' ovsx publish -p ${OVSX_TOKEN}' + " ${ env.publishPreReleaseFlag} "
134
141
}
135
142
}
136
143
137
- }// if publishToMarketPlace
144
+ }// if any publishing
138
145
}
0 commit comments