From 2bb85c1752fbb102e488651e330d5d38136bf2d1 Mon Sep 17 00:00:00 2001 From: Alan Moran Date: Thu, 8 Aug 2024 16:58:12 +0200 Subject: [PATCH] Fix lints --- ci/infrastructure/scripts/deploy-multiapps-controller.sh | 5 +++-- ci/infrastructure/scripts/deploy-prometheus.sh | 2 +- ci/infrastructure/scripts/utils.source.sh | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ci/infrastructure/scripts/deploy-multiapps-controller.sh b/ci/infrastructure/scripts/deploy-multiapps-controller.sh index 603fbdc838..826cb947bf 100755 --- a/ci/infrastructure/scripts/deploy-multiapps-controller.sh +++ b/ci/infrastructure/scripts/deploy-multiapps-controller.sh @@ -23,7 +23,8 @@ function deploy_multiapps_controller() { mv multiapps-controller-web-war/*.war . pushd multiapps-controller-web-manifest - cf push -f *.yml "${app_name}" + cf push -f ./*.yml "${app_name}" + popd } @@ -42,7 +43,7 @@ function cleanup_multiapps_controller() { } load_bbl_vars -cf_login +cf_login "${system_domain}" cleanup_multiapps_controller create_postgres_service add_postrgres_security_group diff --git a/ci/infrastructure/scripts/deploy-prometheus.sh b/ci/infrastructure/scripts/deploy-prometheus.sh index ce9c240fa7..01fbe9e641 100755 --- a/ci/infrastructure/scripts/deploy-prometheus.sh +++ b/ci/infrastructure/scripts/deploy-prometheus.sh @@ -13,7 +13,7 @@ uaa_ssl_ca_file="${UAA_SSL_CA_FILE:-$(mktemp)}" uaa_ssl_cert_file="${UAA_SSL_CERT_FILE:-$(mktemp)}" uaa_ssl_key_file="${UAA_SSL_KEY_FILE:-$(mktemp)}" slack_channel="${SLACK_CHANNEL:-cf-dev-autoscaler-alerts}" -slack_webhook="${SLACK_WEBHOOK}" +slack_webhook="${SLACK_WEBHOOK:-}" prometheus_dir="${PROMETHEUS_DIR:-$(realpath -e ${root_dir}/../prometheus-boshrelease)}" deployment_manifest=${DEPLOYMENT_MANIFEST:-"${prometheus_dir}/manifests/prometheus.yml"} prometheus_ops="${prometheus_dir}/manifests/operators" diff --git a/ci/infrastructure/scripts/utils.source.sh b/ci/infrastructure/scripts/utils.source.sh index a1a270e618..a93c8db935 100644 --- a/ci/infrastructure/scripts/utils.source.sh +++ b/ci/infrastructure/scripts/utils.source.sh @@ -26,7 +26,7 @@ function upload_release(){ pushd "${release_dir}" > /dev/null || exit echo "Uploading release from ${release_dir}" echo "Listing files in ${release_dir}:" - log $(ls -1 *.tgz) + log "$(ls -1 ./*.tgz)" bosh -n upload-release release.tgz popd > /dev/null || exit } @@ -51,6 +51,8 @@ function load_bbl_vars() { } function validate_ops_files() { + local ops_files=$1 + for ops_file in ${ops_files}; do if [ ! -f "${ops_file}" ]; then echo "ERROR: could not find ops file ${ops_file} in ${PWD}" @@ -66,6 +68,8 @@ function add_var_to_bosh_deploy_opts() { } function cf_login(){ + local system_domain=$1 + cf api "https://api.${system_domain}" --skip-ssl-validation CF_ADMIN_PASSWORD=$(credhub get -n /bosh-autoscaler/cf/cf_admin_password -q) cf auth admin "$CF_ADMIN_PASSWORD"