Various fixes in software.yml

This commit is contained in:
Brian Zalewski 2023-12-05 07:59:05 +00:00
parent ce8fb94a45
commit 05ec829eea
3 changed files with 22 additions and 19 deletions

View file

@ -1739,7 +1739,7 @@ softwarePlugins:
- if ! helm plugin list | grep "Query at a given interval a Prometheus, ElasticSearch or Sentry instance." > /dev/null; then helm plugin install https://github.com/ContainerSolutions/helm-monitor; fi - if ! helm plugin list | grep "Query at a given interval a Prometheus, ElasticSearch or Sentry instance." > /dev/null; then helm plugin install https://github.com/ContainerSolutions/helm-monitor; fi
- if ! helm plugin list | grep "This plugin provides secrets values encryption for Helm charts secure storing" > /dev/null; then helm plugin install https://github.com/jkroepke/helm-secrets; fi - if ! helm plugin list | grep "This plugin provides secrets values encryption for Helm charts secure storing" > /dev/null; then helm plugin install https://github.com/jkroepke/helm-secrets; fi
krew: krew:
cmd: bash -c 'if ! kubectl krew list | grep "^{PLUGIN}$" > /dev/null; then if ! kubectl krew search "{PLUGIN}" | grep ' unavailable on ' > /dev/null; then kubectl krew install "{PLUGIN}"; else echo "UNSUPPORTED PLATFORM - {PLUGIN} is not supported on the current platform"; fi; fi' cmd: bash -c 'if ! kubectl krew list | grep "^{PLUGIN}$" > /dev/null; then if ! kubectl krew search "{PLUGIN}" | grep " unavailable on " > /dev/null; then kubectl krew install "{PLUGIN}"; else echo "UNSUPPORTED PLATFORM - {PLUGIN} is not supported on the current platform"; fi; fi'
plugins: plugins:
- access-matrix - access-matrix
- cert-manager - cert-manager

View file

@ -772,7 +772,7 @@ async function beforeInstall(packageManager) {
log('error', 'Homebrew', 'Failed running brew update / upgrade') log('error', 'Homebrew', 'Failed running brew update / upgrade')
log('info', 'Homebrew', 'Running brew tap --repair and trying again') log('info', 'Homebrew', 'Running brew tap --repair and trying again')
try { try {
runCommand('Repairing taps and retrying brew update / upgrade', 'sudo rm -rf $(brew --cache) && brew tap --repair && brew update && brew upgrade --cask --greedy && brew upgrade --force --greedy') runCommand('Repairing taps and retrying brew update / upgrade', 'export HOMEBREW_TEMP=/tmp && sudo rm -rf $(brew --cache) && brew tap --repair && brew update && brew upgrade --cask --greedy && brew upgrade --force --greedy')
} catch (e) { } catch (e) {
console.log(e) console.log(e)
log('error', 'Homebrew', 'Failed both attempts to run brew update / upgrade') log('error', 'Homebrew', 'Failed both attempts to run brew update / upgrade')
@ -1789,14 +1789,13 @@ async function pruneInstallOrders(installOrders) {
async function installPlugins(pluginData) { async function installPlugins(pluginData) {
if (pluginData.cmd && pluginData.plugins && pluginData.plugins.length) { if (pluginData.cmd && pluginData.plugins && pluginData.plugins.length) {
const pluginWhen = pluginData.when
try {
runCommand(`Checking when condition for ${pluginData.package} plugin - ${plugin}`, pluginWhen)
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)
const pluginWhen = pluginData.when
try { try {
if (pluginWhen) {
runCommand(`Checking when condition for ${pluginData.package} plugin - ${plugin}`, pluginWhen)
}
try { try {
runCommand(`Installing ${pluginData.package} plugin - ${plugin}`, pluginCmd) runCommand(`Installing ${pluginData.package} plugin - ${plugin}`, pluginCmd)
log('success', 'Plugin', `Successfully installed ${pluginData.package} plugin - ${plugin}`) log('success', 'Plugin', `Successfully installed ${pluginData.package} plugin - ${plugin}`)
@ -1812,7 +1811,9 @@ async function installPlugins(pluginData) {
log('error', 'Plugin', `Failed to install ${pluginData.package} plugin due to an unknown reason - ${plugin}`) log('error', 'Plugin', `Failed to install ${pluginData.package} plugin due to an unknown reason - ${plugin}`)
console.error(e) console.error(e)
} }
}
} catch (e) {
log('info', 'Plugin', 'Failed to pass when condition')
} }
} }
if (pluginData.update) { if (pluginData.update) {

View file

@ -1294,6 +1294,7 @@ softwarePackages:
brew-pkg: brew-pkg:
_github: https://github.com/timsutton/brew-pkg _github: https://github.com/timsutton/brew-pkg
_name: Homebrew Pkg _name: Homebrew Pkg
_when:brew:darwin: '! brew list brew-pkg'
brew:darwin: timsutton/formulae/brew-pkg brew:darwin: timsutton/formulae/brew-pkg
xpanes: xpanes:
_bin: xpanes _bin: xpanes
@ -10235,6 +10236,7 @@ softwarePackages:
_bin: github-classroom-assistant _bin: github-classroom-assistant
_github: https://github.com/education/classroom-assistant _github: https://github.com/education/classroom-assistant
_name: GitHub Classroom Assistant _name: GitHub Classroom Assistant
_app: Classroom Assistant.app
apt: https://github.com/education/classroom-assistant/releases/download/v2.0.4/classroom-assistant_2.0.4_amd64.deb apt: https://github.com/education/classroom-assistant/releases/download/v2.0.4/classroom-assistant_2.0.4_amd64.deb
dnf: https://github.com/education/classroom-assistant/releases/download/v2.0.4/classroom-assistant-2.0.4-1.x86_64.rpm dnf: https://github.com/education/classroom-assistant/releases/download/v2.0.4/classroom-assistant-2.0.4-1.x86_64.rpm
cask: classroom-assistant cask: classroom-assistant