-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include server packages into vsix #182
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ vsc-extension-quickstart.md | |
undefined/** | ||
CONTRIBUTING.md | ||
.vscode-test/** | ||
server/** | ||
**/**.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,24 +12,14 @@ def buildVscodeExtension(){ | |
sh "npm run vscode:prepublish" | ||
} | ||
|
||
def updateArchiveDownloadUrl(url){ | ||
def downloadConfig = readJSON file: 'server_archive.json' | ||
downloadConfig.production.url = url | ||
writeJSON file:'server_archive.json', json: downloadConfig | ||
} | ||
|
||
node('rhel7'){ | ||
stage 'Build JDT LS' | ||
git url: 'https://github.com/eclipse/eclipse.jdt.ls.git' | ||
def mvnHome = tool 'maven-3.3.9' | ||
sh "${mvnHome}/bin/mvn clean verify -B -U -fae -e -Pserver-distro" | ||
|
||
stage 'Upload Server to staging' | ||
def files = findFiles(glob: '**/org.eclipse.jdt.ls.product/distro/**.tar.gz') | ||
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${files[0].path} [email protected]:/downloads_htdocs/jbosstools/jdt.ls/staging" | ||
stash name: 'server_distro',includes :files[0].path | ||
env.stageUrl = 'http://download.jboss.org/jbosstools/jdt.ls/staging/' + files[0].name | ||
|
||
} | ||
|
||
node('rhel7'){ | ||
|
@@ -38,14 +28,15 @@ node('rhel7'){ | |
deleteDir() | ||
git url: 'https://github.com/redhat-developer/vscode-java.git' | ||
|
||
stage 'Update server archive url to staging' | ||
updateArchiveDownloadUrl(env.stageUrl) | ||
|
||
stage 'install vscode-java build requirements' | ||
installBuildRequirements() | ||
|
||
stage 'Build vscode-java' | ||
buildVscodeExtension() | ||
unstash 'server_distro' | ||
def files = findFiles(glob: '**/org.eclipse.jdt.ls.product/distro/**.tar.gz') | ||
sh "mkdir ./server" | ||
sh "tar -xvzf ${files[0].path} -C ./server" | ||
|
||
stage 'Test vscode-java for staging' | ||
wrap([$class: 'Xvnc']) { | ||
|
@@ -59,39 +50,20 @@ node('rhel7'){ | |
stage 'Upload vscode-java to staging' | ||
def vsix = findFiles(glob: '**.vsix') | ||
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${vsix[0].path} [email protected]:/downloads_htdocs/jbosstools/jdt.ls/staging" | ||
stash excludes:'server/, .vscode-test/, **.vsix, target/' , name:'extension_source' | ||
stash name:'vsix', includes:files[0].path | ||
} | ||
|
||
node('rhel7'){ | ||
if(publishToMarketPlace.equals('true')){ | ||
timeout(time:5, unit:'DAYS') { | ||
input message:'Approve deployment?', submitter: 'bercan' | ||
} | ||
stage 'Upload Server to release' | ||
unstash 'server_distro' | ||
def files = findFiles(glob: '**/org.eclipse.jdt.ls.product/distro/**.tar.gz') | ||
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${files[0].path} [email protected]:/downloads_htdocs/tools/static/vscode" | ||
def prodUrl = 'http://download.jboss.org/jbosstools/static/vscode/' + files[0].name | ||
|
||
stage 'Checkout vscode-java for release build' | ||
deleteDir() | ||
unstash 'extension_source' | ||
|
||
stage 'Update server archive url to release' | ||
updateArchiveDownloadUrl(prodUrl) | ||
archive includes:"server_archive.json" | ||
|
||
stage 'install vscode-java build requirements' | ||
installBuildRequirements() | ||
|
||
stage 'Test vscode-java for release' | ||
wrap([$class: 'Xvnc']) { | ||
sh "npm test --silent" | ||
} | ||
|
||
stage "Publish to Marketplace" | ||
unstash vsix; | ||
withCredentials([[$class: 'StringBinding', credentialsId: 'vscode_java_marketplace', variable: 'TOKEN']]) { | ||
sh 'vsce publish -p ${TOKEN}' | ||
def vsix = findFiles(glob: '**.vsix') | ||
sh 'vsce publish -p ${TOKEN} --packagePath ${vsix[0].path}' | ||
} | ||
archive includes:"**.vsix" | ||
}//if publishMarketPlace | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,54 @@ | ||
'use strict'; | ||
const gulp = require('gulp'); | ||
const gulp_tslint = require('gulp-tslint'); | ||
const cp = require('child_process'); | ||
const decompress = require('gulp-decompress'); | ||
const download = require('gulp-download'); | ||
|
||
//... | ||
gulp.task('tslint', () => { | ||
return gulp.src(['**/*.ts', '!**/*.d.ts', '!node_modules/**']) | ||
.pipe(gulp_tslint()) | ||
.pipe(gulp_tslint.report()); | ||
}); | ||
}); | ||
|
||
gulp.task('download_server', ()=> | ||
{ | ||
download("http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz") | ||
.pipe(decompress()) | ||
.pipe(gulp.dest('./server')) | ||
}); | ||
|
||
gulp.task('build_server', ()=> | ||
{ | ||
cp.execSync('mvn -f ../eclipse.jdt.ls/pom.xml -Pserver-distro clean package', {stdio:[0,1,2]} ); | ||
gulp.src('../eclipse.jdt.ls/org.eclipse.jdt.ls.product/distro/*.tar.gz') | ||
.pipe(decompress()) | ||
.pipe(gulp.dest('./server')) | ||
}); | ||
|
||
gulp.task('dev_server', ()=> | ||
{ | ||
let isWin = /^win/.test(process.platform); | ||
let isMac = /^darwin/.test(process.platform); | ||
let isLinux = /^linux/.test(process.platform); | ||
let command = 'mvn -f ../eclipse.jdt.ls/pom.xml -Pserver-distro,fast -o clean package '; | ||
if(isLinux){ | ||
command +='-Denvironment.os=linux -Denvironment.ws=gtk -Denvironment.arch=x86_64'; | ||
} | ||
if(isMac){ | ||
command += '-Denvironment.os=macosx -Denvironment.ws=cocoa -Denvironment.arch=x86_64'; | ||
}else | ||
if(isWin){ | ||
command += '-Denvironment.os=win32 -Denvironment.ws=win32 -Denvironment.arch=x86_64'; | ||
} | ||
console.log('executing '+command); | ||
cp.execSync(command, {stdio:[0,1,2]} ); | ||
gulp.src('../eclipse.jdt.ls/org.eclipse.jdt.ls.product/distro/*.tar.gz') | ||
.pipe(decompress()) | ||
.pipe(gulp.dest('./server')) | ||
}); | ||
|
||
gulp.task('watch_server',()=>{ | ||
gulp.watch('../eclipse.jdt.ls/org.eclipse.jdt.ls.core/**/*.java',['dev_server']); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add link to http://download.eclipse.org/jdtls/snapshots/?d on snapshot build