Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
fix antithesis trigger (#7315)
Browse files Browse the repository at this point in the history
  • Loading branch information
barisoyoruk authored Oct 8, 2024
1 parent 1c8c64f commit 25893dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
- run:
command: |
# hack - notion of "owners" isn't supported in Circle 2
if [ $CIRCLE_PROJECT_USERNAME = 'palantir' ] && [ -z $CIRCLE_PR_NUMBER ] && [ $CIRCLE_TAG ]; then
if [ $CIRCLE_PROJECT_USERNAME = 'palantir' ] && [ -z $CIRCLE_PR_NUMBER ]; then
./scripts/circle-ci/publish-images-to-antithesis.sh
./scripts/circle-ci/trigger-antithesis-simulation.sh
fi
Expand Down
18 changes: 15 additions & 3 deletions scripts/circle-ci/trigger-antithesis-simulation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ if [[ -z "${ANTITHESIS_WEBHOOK_PASSWORD}" ]]; then
exit 1
fi

WEBHOOK_LOCATOR="palantir_atlasdb__baseline__latest"
echo "Triggering simulation on Antithesis via the ${WEBHOOK_LOCATOR} webhook."
curl -v -u "palantir:${ANTITHESIS_WEBHOOK_PASSWORD}" -X POST https://palantir.antithesis.com/api/v1/launch_experiment/${WEBHOOK_LOCATOR}
if [[ -z "${ANTITHESIS_REPORT_RECIPIENT}" ]]; then
echo "Antithesis report recipient is not set as an environment variable, exiting."
exit 1
fi

WEBHOOK_LOCATOR="atlasdb"
TEST_DURATION=$([ -n "${CIRCLE_TAG}" ] && echo "12" || echo "3")
echo "Triggering simulation on Antithesis via the ${WEBHOOK_LOCATOR} webhook with a test duration of ${TEST_DURATION} hours."
curl -v -u "palantir:${ANTITHESIS_WEBHOOK_PASSWORD}" -X POST https://palantir.antithesis.com/api/v1/launch_experiment/${WEBHOOK_LOCATOR} -d \
'{ "params": {
"antithesis.images":"cassandra:latest;timelock-server-distribution:latest;atlasdb-workload-server-distribution:latest",
"antithesis.config_image":"atlasdb-workload-server-antithesis:latest",
"custom.duration":"'${TEST_DURATION}'",
"antithesis.report.recipients":"'${ANTITHESIS_REPORT_RECIPIENT}'"
} }'

0 comments on commit 25893dd

Please sign in to comment.