Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin Monit CI to a specific release #1490

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions tests/ci/integration/run_monit_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

source tests/ci/common_posix_setup.sh

MONIT_VERSION_TAG="release-5-33-0"

# Set up environment.

# SYS_ROOT
Expand All @@ -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}"
Expand All @@ -41,15 +52,15 @@ 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

aws_lc_build "$SRC_ROOT" "$AWS_LC_BUILD_FOLDER" "$AWS_LC_INSTALL_FOLDER" -DBUILD_TESTING=OFF -DBUILD_TOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=0

# Build monit from source.
pushd ${MONIT_SRC_FOLDER}

monit_upgrade_reminder
monit_build
monit_run_tests
popd
Expand Down
Loading