Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.vscode/** | ||
typings/** | ||
out/test/** | ||
test/** | ||
src/** | ||
images/** | ||
**/*.map | ||
.gitignore | ||
.github/** | ||
tsconfig.json | ||
vsc-extension-quickstart.md | ||
undefined/** | ||
CONTRIBUTING.md | ||
.vscode-test/** | ||
**/**.vsix | ||
**/**.tar.gz |
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env groovy | ||
|
||
def installBuildRequirements(){ | ||
def nodeHome = tool 'nodejs-7.7.4' | ||
env.PATH="${env.PATH}:${nodeHome}/bin" | ||
sh "npm install -g typescript" | ||
sh "npm install -g vsce" | ||
} | ||
|
||
def buildVscodeExtension(){ | ||
sh "npm install" | ||
sh "npm run vscode:prepublish" | ||
} | ||
|
||
node('rhel7'){ | ||
|
||
stage 'Checkout vscode-yaml code' | ||
deleteDir() | ||
git url: 'https://github.com/redhat-developer/vscode-yaml.git' | ||
|
||
stage 'install vscode-yaml build requirements' | ||
installBuildRequirements() | ||
|
||
stage 'Build vscode-yaml' | ||
sh "npm install" | ||
sh "npm run vscode:prepublish" | ||
|
||
stage 'Test vscode-yaml for staging' | ||
wrap([$class: 'Xvnc']) { | ||
sh "npm test --silent" | ||
} | ||
|
||
stage "Package vscode-yaml" | ||
def packageJson = readJSON file: 'package.json' | ||
sh "vsce package -o yaml-${packageJson.version}-${env.BUILD_NUMBER}.vsix" | ||
|
||
stage 'Upload vscode-yaml to staging' | ||
def vsix = findFiles(glob: '**.vsix') | ||
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${vsix[0].path} ${UPLOAD_LOCATION}" | ||
stash name:'vsix', includes:files[0].path | ||
} | ||
|
||
node('rhel7'){ | ||
if(publishToMarketPlace.equals('true')){ | ||
timeout(time:5, unit:'DAYS') { | ||
input message:'Approve deployment?', submitter: 'gercan' | ||
} | ||
|
||
stage "Publish to Marketplace" | ||
unstash 'vsix'; | ||
withCredentials([[$class: 'StringBinding', credentialsId: 'vscode_java_marketplace', variable: 'TOKEN']]) { | ||
def vsix = findFiles(glob: '**.vsix') | ||
sh 'vsce publish -p ${TOKEN} --packagePath' + " ${vsix[0].path}" | ||
} | ||
archive includes:"**.vsix" | ||
}//if publishMarketPlace | ||
} |