From 75b90f16ce36dfa25500872ee0e97fa0f93c13bb Mon Sep 17 00:00:00 2001 From: samuel40791765 Date: Tue, 12 Mar 2024 22:48:54 +0000 Subject: [PATCH] Pin Monit CI to a specific release --- tests/ci/integration/run_monit_integration.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/ci/integration/run_monit_integration.sh b/tests/ci/integration/run_monit_integration.sh index 8eb583c2f7..506c77a086 100755 --- a/tests/ci/integration/run_monit_integration.sh +++ b/tests/ci/integration/run_monit_integration.sh @@ -4,6 +4,8 @@ source tests/ci/common_posix_setup.sh +MONIT_VERSION_TAG="release-5-33-0" + # Set up environment. # SYS_ROOT @@ -21,6 +23,15 @@ MONIT_BUILD_FOLDER="${SCRATCH_FOLDER}/monit-aws-lc" AWS_LC_BUILD_FOLDER="${SCRATCH_FOLDER}/aws-lc-build" AWS_LC_INSTALL_FOLDER="${SCRATCH_FOLDER}/aws-lc-install" +function monit_upgrade_reminder() { + LATEST_MONIT_VERSION_TAG=`git describe --tags --abbrev=0` + if [[ "${LATEST_MONIT_VERSION_TAG}" != "${MONIT_VERSION_TAG}" ]]; then + aws cloudwatch put-metric-data --namespace AWS-LC --metric-name MonitVersionUpdate --value 1 + else + aws cloudwatch put-metric-data --namespace AWS-LC --metric-name MonitVersionUpdate --value 0 + fi +} + function monit_build() { ./bootstrap ./configure --with-ssl-static="${AWS_LC_INSTALL_FOLDER}" @@ -41,7 +52,7 @@ mkdir -p ${SCRATCH_FOLDER} rm -rf "${SCRATCH_FOLDER:?}"/* cd ${SCRATCH_FOLDER} -git clone https://bitbucket.org/tildeslash/monit.git ${MONIT_SRC_FOLDER} --depth 1 +git clone https://bitbucket.org/tildeslash/monit.git ${MONIT_SRC_FOLDER} -b ${MONIT_VERSION_TAG} --depth 1 mkdir -p ${AWS_LC_BUILD_FOLDER} ${AWS_LC_INSTALL_FOLDER} ${MONIT_BUILD_FOLDER} ls @@ -49,7 +60,7 @@ aws_lc_build "$SRC_ROOT" "$AWS_LC_BUILD_FOLDER" "$AWS_LC_INSTALL_FOLDER" -DBUILD # Build monit from source. pushd ${MONIT_SRC_FOLDER} - +monit_upgrade_reminder monit_build monit_run_tests popd