Added plugin when capability
This commit is contained in:
parent
999edd4e2e
commit
b883ffa0a6
2 changed files with 14 additions and 3 deletions
|
@ -1774,12 +1774,22 @@ async function installPlugins(pluginData) {
|
||||||
for (const plugin of pluginData.plugins) {
|
for (const plugin of pluginData.plugins) {
|
||||||
try {
|
try {
|
||||||
const pluginCmd = pluginData.cmd.replace(/{PLUGIN}/g, plugin)
|
const pluginCmd = pluginData.cmd.replace(/{PLUGIN}/g, plugin)
|
||||||
runCommand(`Installing ${pluginData.package} plugin - ${plugin}`, pluginCmd)
|
const pluginWhen = pluginData.when
|
||||||
log('success', 'Plugin', `Successfully installed ${pluginData.package} plugin - ${plugin}`)
|
try {
|
||||||
|
if (pluginWhen) {
|
||||||
|
runCommand(`Checking when condition for ${pluginData.package} plugin - ${plugin}`, pluginWhen)
|
||||||
|
}
|
||||||
|
runCommand(`Installing ${pluginData.package} plugin - ${plugin}`, pluginCmd)
|
||||||
|
log('success', 'Plugin', `Successfully installed ${pluginData.package} plugin - ${plugin}`)
|
||||||
|
} catch (e) {
|
||||||
|
log('info', 'Plugin', `Failed to install ${pluginData.package} plugin - ${plugin}`)
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log('error', 'Plugin', `Failed to install ${pluginData.package} plugin - ${plugin}`)
|
log('error', 'Plugin', `Failed to install ${pluginData.package} plugin - ${plugin`)
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pluginData.update) {
|
if (pluginData.update) {
|
||||||
|
|
|
@ -10798,6 +10798,7 @@ softwarePlugins:
|
||||||
- redhatdeveloper/openshift-dd-ext
|
- redhatdeveloper/openshift-dd-ext
|
||||||
- snyk/snyk-docker-desktop-extension
|
- snyk/snyk-docker-desktop-extension
|
||||||
- tailscale/docker-extension:1.0.0
|
- tailscale/docker-extension:1.0.0
|
||||||
|
when: docker extension &>2 /dev/null
|
||||||
dockerImages:
|
dockerImages:
|
||||||
cmd: null
|
cmd: null
|
||||||
plugins:
|
plugins:
|
||||||
|
|
Loading…
Reference in a new issue