Last active
September 20, 2017 15:00
-
-
Save CodeFreezr/946ca390ce48fbcefb8c80a51e4f959e to your computer and use it in GitHub Desktop.
Download and install 23 #vscode Extensions for DevOps and CI/CD at once.
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
/* DevOps CI/CD */ | |
def extensions = [ | |
1: [name:'code-runner', version: '0.6.15', publisher: 'formulahendry'], | |
2: [name:'jenkins-status', version: '0.3.0', publisher: 'alefragnani'], | |
3: [name:'jenkinsfile-support', version: '0.1.0', publisher: 'secanis'], | |
4: [name:'vscode-yaml-validation', version: '0.0.1', publisher: 'djabraham'], | |
5: [name:'code-settings-sync', version: '2.6.1', publisher: 'Shan'], | |
6: [name:'scala', version: '0.0.4', publisher: 'daltonjorge'], | |
7: [name:'google-search-ext', version: '0.1.2', publisher: 'adelphes'], | |
8: [name:'java', version: '0.0.13', publisher: 'redhat'], | |
9: [name:'json-tools', version: '1.0.2', publisher: 'eriklynd'], | |
10: [name:'mssql', version: '0.3.0', publisher: 'ms-mssql'], | |
11: [name:'npm-intellisense', version: '1.3.0', publisher: 'christian-kohler'], | |
12: [name:'translatorplus', version: '1.0.0', publisher: 'lkytal'], | |
13: [name:'vscode-apache', version: '1.1.1', publisher: 'mrmlnc'], | |
14: [name:'vscode-database', version: '1.2.0', publisher: 'bajdzis'], | |
15: [name:'vscode-docker', version: '0.0.13', publisher: 'PeterJausovec'], | |
16: [name:'Gradle', version: '1.1.2', publisher: 'cazzar09'], | |
17: [name:'vscode-autohotkey', version: '0.1.1', publisher: 'slevesque'], | |
18: [name:'output-colorizer', version: '0.0.11', publisher: 'IBM'], | |
19: [name:'npm', version: '0.1.8', publisher: 'fknop'], | |
20: [name:'rest-client', version: '0.13.0', publisher: 'humao'], | |
21: [name:'vscode-statusbar-json-path', version: '1.0.6', publisher: 'richie5um2'], | |
22: [name:'vscode-apielements', version:'0.6.4', publisher: 'vncz'], | |
23: [name:'xml', version:'1.7.0', publisher: 'DotJoshJohnson'] | |
] | |
def installed_extensions = "cmd /c code --list-extensions".execute().text | |
def amount = extensions.size() | |
extensions.eachWithIndex { entry, i -> | |
Map extension = entry.value | |
if (installed_extensions.contains(extension."name".value.toString())) { | |
println "${i+1}#${amount}:\t ${extension.'name'.value} allready installed." | |
} else { | |
def myUrl = "https://${extension.'name'.value}.gallery.vsassets.io/_apis/public/gallery/publisher/${extension.'publisher'.value}/extension/${extension.'name'.value}/${extension.'version'.value}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" | |
new File("${extension.'name'.value}.vsix") << new URL (myUrl).getBytes() | |
println "${extension.'name'.value} download ready." | |
print "cmd /c code --install-extension ${extension.'name'.value}.vsix".execute().text | |
} | |
} | |
/* if you are behind a firewall use this wrapper-sciptline (evt. change port 8080): | |
groovy -Dhttps.proxyHost=${yourproxy} -Dhttps.proxyPort=8080 extendcode.groovy | |
No(C) but <3 from CodeFreezr 2017 */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment