Skip to content

Commit

Permalink
chore(ubuntu) shellcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Jan 2, 2025
1 parent 9e8391c commit c68c7f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions provisioning/ubuntu-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ function install_golangcilint(){
## Ensure that the Jenkins Agent commons requirements are installed
function install_JA_requirements(){
apt-get update --quiet
# JQ_VERSION is an env var provided outside of the script
# shellcheck disable=SC2153
apt-get install --yes --no-install-recommends \
make \
unzip \
Expand Down Expand Up @@ -351,6 +353,8 @@ function install_jdks() {
## Prevent Java null pointer exception due to missing fontconfig / add jq that should already be installed but make this install_jdk function idempotent
apt-get install --yes --no-install-recommends fontconfig jq="${JQ_VERSION}*"

# JDK*_VERSION are env. vars provided outside of the script
# shellcheck disable=SC2153
for jdk_version_to_install in "${JDK8_VERSION}" "${JDK11_VERSION}" "${JDK17_VERSION}" "${JDK21_VERSION}"
do
echo "=== Installing Temurin JDK version ${jdk_version_to_install}..."
Expand Down Expand Up @@ -436,7 +440,6 @@ function install_jxreleaseversion() {

## Ensure that azure-cli is installed
function install_azurecli() {
local az_repo
apt-get update --quiet
apt-get install --yes --no-install-recommends \
gpg \
Expand Down Expand Up @@ -671,7 +674,7 @@ function install_yamllint() {
## Ensure that the VM is cleaned up of provision artifacts
function cleanup() {
export HISTSIZE=0
rm -rf /tmp/* /var/log/* ${HOME}/.npm
rm -rf /tmp/* /var/log/* "${HOME}/.npm"
sync
}

Expand Down Expand Up @@ -712,8 +715,8 @@ function main() {
install_gh
install_golang
install_golangcilint # must come after golang
install_ruby ${RUBY_PUPPET_VERSION}
install_ruby ${RUBY_VERSION}
install_ruby "${RUBY_PUPPET_VERSION}"
install_ruby "${RUBY_VERSION}"
install_vagrant
install_xq
install_yq
Expand Down

0 comments on commit c68c7f1

Please sign in to comment.