diff options
author | Tausif Rahman <tausif.rahman@mongodb.com> | 2022-06-16 15:35:41 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-16 16:14:44 +0000 |
commit | ca78a199dd1673c3f0eb25c4c33681db703522f3 (patch) | |
tree | 7a566428fd1b186b89d61ec55b867d1191e1282b /evergreen | |
parent | b9852f174f6a165496dfad4b21279c71ca64cda3 (diff) | |
download | mongo-ca78a199dd1673c3f0eb25c4c33681db703522f3.tar.gz |
SERVER-65904 enable consistency checking hooks in Antithesis
Diffstat (limited to 'evergreen')
-rw-r--r-- | evergreen/antithesis_dry_run.sh | 6 | ||||
-rw-r--r-- | evergreen/antithesis_image_build.sh | 33 | ||||
-rw-r--r-- | evergreen/antithesis_image_push.sh | 35 |
3 files changed, 41 insertions, 33 deletions
diff --git a/evergreen/antithesis_dry_run.sh b/evergreen/antithesis_dry_run.sh new file mode 100644 index 00000000000..740e21bd2d7 --- /dev/null +++ b/evergreen/antithesis_dry_run.sh @@ -0,0 +1,6 @@ +set -o errexit +set -o verbose + +cd antithesis/topologies/sharded_cluster +sudo docker-compose up -d +sudo docker exec workload /bin/bash -c 'cd resmoke && . python3-venv/bin/activate && python3 run_suite.py' diff --git a/evergreen/antithesis_image_build.sh b/evergreen/antithesis_image_build.sh index 0b986770102..2be5630740d 100644 --- a/evergreen/antithesis_image_build.sh +++ b/evergreen/antithesis_image_build.sh @@ -3,15 +3,6 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" set -euo pipefail -cd src -commit_date=$(date -d "$(git log -1 -s --format=%ci)" "+%s") -last_run_date=$(cat ../antithesis_last_push.txt || echo 0) -if [ "${is_patch}" != "true" ] && [ "${last_run_date}" -gt "${commit_date}" ]; then - echo -e "Refusing to push new antithesis images because this commit is older\nthan the last pushed commit" - exit 0 -fi -cd .. - # check that the binaries in dist-test are linked to libvoidstar ldd src/dist-test/bin/mongod | grep libvoidstar ldd src/dist-test/bin/mongos | grep libvoidstar @@ -75,27 +66,3 @@ sudo docker build . -t repl-set-config:$tag cd ../sharded_cluster sed -i s/evergreen-latest-master/$tag/ docker-compose.yml sudo docker build . -t sharded-cluster-config:$tag - -# login, push, and logout -echo "${antithesis_repo_key}" > mongodb.key.json -cat mongodb.key.json | sudo docker login -u _json_key https://us-central1-docker.pkg.dev --password-stdin -rm mongodb.key.json - -# tag and push to the registry -sudo docker tag "mongo-binaries:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/mongo-binaries:$tag" -sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/mongo-binaries:$tag" - -sudo docker tag "workload:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/workload:$tag" -sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/workload:$tag" - -sudo docker tag "repl-set-config:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/repl-set-config:$tag" -sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/repl-set-config:$tag" - -sudo docker tag "sharded-cluster-config:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/sharded-cluster-config:$tag" -sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/sharded-cluster-config:$tag" - -sudo docker logout https://us-central1-docker.pkg.dev - -if [ "${is_patch}" != "true" ]; then - echo "$commit_date" > antithesis_next_push.txt -fi diff --git a/evergreen/antithesis_image_push.sh b/evergreen/antithesis_image_push.sh new file mode 100644 index 00000000000..94e1a2bf0b7 --- /dev/null +++ b/evergreen/antithesis_image_push.sh @@ -0,0 +1,35 @@ +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" +. "$DIR/prelude.sh" + +set -euo pipefail + +# push images as evergreen-latest-${branch_name}, unless it's a patch +tag="evergreen-latest-${branch_name}" +if [ "${is_patch}" = "true" ]; then + tag="evergreen-patch" +fi + +if [ -n "${antithesis_image_tag:-}" ]; then + echo "Using provided tag: '$antithesis_image_tag' for docker pushes" + tag=$antithesis_image_tag +fi + +# login, push, and logout +echo "${antithesis_repo_key}" > mongodb.key.json +cat mongodb.key.json | sudo docker login -u _json_key https://us-central1-docker.pkg.dev --password-stdin +rm mongodb.key.json + +# tag and push to the registry +sudo docker tag "mongo-binaries:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/mongo-binaries:$tag" +sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/mongo-binaries:$tag" + +sudo docker tag "workload:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/workload:$tag" +sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/workload:$tag" + +sudo docker tag "repl-set-config:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/repl-set-config:$tag" +sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/repl-set-config:$tag" + +sudo docker tag "sharded-cluster-config:$tag" "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/sharded-cluster-config:$tag" +sudo docker push "us-central1-docker.pkg.dev/molten-verve-216720/mongodb-repository/sharded-cluster-config:$tag" + +sudo docker logout https://us-central1-docker.pkg.dev |