From c6b8bf97c1e62e984e50373d1d8fb9bbb0efaa24 Mon Sep 17 00:00:00 2001 From: patrickhargett Date: Wed, 3 Apr 2024 15:12:44 -0400 Subject: [PATCH] Add build ID to support bundle This PR aims to add a simple build number that we can use to identify which version of the support bundle is being used. I'm proposing that we use a build ID that contains the date of the PR in the format of yyyymmdd. We will need to remember to update this when changes are made. If there is a better way to do this, please let me know. --- support_bundle/get_support_bundle.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support_bundle/get_support_bundle.sh b/support_bundle/get_support_bundle.sh index a313f00..32dc76f 100755 --- a/support_bundle/get_support_bundle.sh +++ b/support_bundle/get_support_bundle.sh @@ -19,6 +19,7 @@ API_KEY="" SECURE_API_KEY="" SKIP_LOGS="false" ELASTIC_CURL="" +declare -r BUILD="20240403" print_help() { printf 'Usage: %s [-a|--api-key ] [c|--context ] [-d|--debug] [-l|--labels ] [-n|--namespace ] [-s|--since ] [--skip-logs] [-h|--help]\n' "$0" @@ -126,6 +127,10 @@ main() { local error local RETVAL + if [[ ! -z ${BUILD} ]]; then + echo ${BUILD} >> ${LOG_DIR}/support_bundle_version.txt + fi + if [[ ! -z ${CONTEXT} ]]; then CONTEXT_OPTS="--context=${CONTEXT}" fi