Reduce puppetserver toml change to the single gem install
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful

This commit is contained in:
2026-09-13 22:59:18 +10:00
parent f108ca852b
commit d246ce10e5
@@ -1,29 +1,11 @@
#!/bin/bash
# No `set -e`: the entrypoint runs post-startup hooks under errexit, so a non-zero
# exit here kills an already-serving compiler. Failures are logged, not fatal.
set -uo pipefail
rc=0
install_gem() {
local label=$1
shift
if ! "$@"; then
echo "ERROR: ${label} gem install failed: $*" >&2
rc=1
fi
}
set -e
echo "Installing additional Ruby gems..."
for gem in deep_merge ipaddr hiera-eyaml toml; do
install_gem agent /opt/puppetlabs/puppet/bin/gem install "$gem"
done
# Server-side functions load from the puppetserver JRuby gem path, not the agent one.
install_gem puppetserver /opt/puppetlabs/bin/puppetserver gem install toml
if [ "$rc" -ne 0 ]; then
echo "ERROR: additional Ruby gems incomplete; catalog compiles may fail" >&2
else
echo "Additional Ruby gems installed successfully"
fi
/opt/puppetlabs/puppet/bin/gem install deep_merge
/opt/puppetlabs/puppet/bin/gem install ipaddr
/opt/puppetlabs/puppet/bin/gem install hiera-eyaml
/opt/puppetlabs/puppet/bin/gem install toml
# Under set -e a failed install kills the entrypoint post-startup hooks, taking down an already-serving compiler.
/opt/puppetlabs/bin/puppetserver gem install toml
echo "Additional Ruby gems installed successfully"