-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rampup' into dkijania/port_remove_snarkyjs_test_rampup
- Loading branch information
Showing
25 changed files
with
530 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
if [[ $# -ne 3 ]]; then | ||
echo "Usage: $0 '<testnet-name>' '<wait-between-polling-graphql>''<wait-after-final-check>'" | ||
exit 1 | ||
fi | ||
|
||
TESTNET_VERSION_NAME="berkeley" | ||
TESTNET_NAME=$1 | ||
WAIT_BETWEEN_POLLING_GRAPHQL=$2 | ||
WAIT_AFTER_FINAL_CHECK=$3 | ||
|
||
case "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" in | ||
rampup|berkeley|release/2.0.0|develop) | ||
;; | ||
*) | ||
echo "Not pulling against rampup, not running the connect test" | ||
exit 0 ;; | ||
esac | ||
|
||
# Don't prompt for answers during apt-get install | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
apt-get install -y git apt-transport-https ca-certificates tzdata curl | ||
|
||
git config --global --add safe.directory /workdir | ||
|
||
source buildkite/scripts/export-git-env-vars.sh | ||
|
||
echo "Installing mina daemon package: mina-${TESTNET_VERSION_NAME}=${MINA_DEB_VERSION}" | ||
echo "deb [trusted=yes] http://packages.o1test.net $MINA_DEB_CODENAME $MINA_DEB_RELEASE" | tee /etc/apt/sources.list.d/mina.list | ||
apt-get update | ||
apt-get install --allow-downgrades -y "mina-${TESTNET_VERSION_NAME}=${MINA_DEB_VERSION}" | ||
|
||
# Remove lockfile if present | ||
rm ~/.mina-config/.mina-lock ||: | ||
|
||
mkdir -p /root/libp2p-keys/ | ||
# Pre-generated random password for this quick test | ||
export MINA_LIBP2P_PASS=eithohShieshichoh8uaJ5iefo1reiRudaekohG7AeCeib4XuneDet2uGhu7lahf | ||
mina libp2p generate-keypair --privkey-path /root/libp2p-keys/key | ||
# Set permissions on the keypair so the daemon doesn't complain | ||
chmod -R 0700 /root/libp2p-keys/ | ||
|
||
# Restart in the background | ||
mina daemon \ | ||
--peer-list-url "https://storage.googleapis.com/seed-lists/${TESTNET_NAME}_seeds.txt" \ | ||
--libp2p-keypair "/root/libp2p-keys/key" \ | ||
& # -background | ||
|
||
# Attempt to connect to the GraphQL client every 10s for up to 8 minutes | ||
num_status_retries=24 | ||
for ((i=1;i<=$num_status_retries;i++)); do | ||
sleep $WAIT_BETWEEN_POLLING_GRAPHQL | ||
set +e | ||
mina client status | ||
status_exit_code=$? | ||
set -e | ||
if [ $status_exit_code -eq 0 ]; then | ||
break | ||
elif [ $i -eq $num_status_retries ]; then | ||
exit $status_exit_code | ||
fi | ||
done | ||
|
||
# Check that the daemon has connected to peers and is still up after 2 mins | ||
sleep $WAIT_AFTER_FINAL_CHECK | ||
mina client status | ||
if [ $(mina advanced get-peers | wc -l) -gt 0 ]; then | ||
echo "Found some peers" | ||
else | ||
echo "No peers found" | ||
exit 1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
let S = ../../Lib/SelectFiles.dhall | ||
let B = ../../External/Buildkite.dhall | ||
let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type | ||
|
||
let JobSpec = ../../Pipeline/JobSpec.dhall | ||
let Pipeline = ../../Pipeline/Dsl.dhall | ||
|
||
let ConnectToTestnet = ../../Command/ConnectToTestnet.dhall | ||
|
||
let dependsOn = [ | ||
{ name = "MinaArtifactBullseye", key = "daemon-berkeley-bullseye-docker-image" } | ||
] | ||
|
||
in Pipeline.build Pipeline.Config::{ | ||
spec = | ||
JobSpec::{ | ||
dirtyWhen = [ | ||
S.strictlyStart (S.contains "src"), | ||
S.exactly "buildkite/scripts/connect-to-testnet" "sh", | ||
S.exactly "buildkite/src/Jobs/Test/ConnectToTestworld-2-0" "dhall", | ||
S.exactly "buildkite/src/Command/ConnectToTestnet" "dhall" | ||
], | ||
path = "Test", | ||
name = "ConnectToTestworld-2-0" | ||
}, | ||
steps = [ | ||
ConnectToTestnet.step dependsOn "testworld-2-0" "40s" "2m" (B/SoftFail.Boolean False) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.