-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker based E2E step in release pipeline
- Loading branch information
Github Action
committed
Jul 1, 2024
1 parent
1b34245
commit c396389
Showing
5 changed files
with
119 additions
and
8 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
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,82 @@ | ||
#! /usr/bin/env -S nix shell 'nixpkgs#docker-compose' 'nixpkgs#rsync' 'nixpkgs#jq' --command bash | ||
# shellcheck shell=bash | ||
|
||
set -euox pipefail | ||
|
||
|
||
NETWORK=preprod | ||
export NETWORK | ||
|
||
TESTS_NODE_DB="$(pwd)/state/node_db" | ||
|
||
mkdir -p "$TESTS_NODE_DB" | ||
export TESTS_NODE_DB | ||
|
||
rsync -a --delete "$NODE_STATE_DIR/db/" "$TESTS_NODE_DB" | ||
|
||
WALLET_TAG=$(buildkite-agent meta-data get "release-cabal-version") | ||
export WALLET_TAG | ||
|
||
NODE_TAG="8.9.3" | ||
export NODE_TAG | ||
|
||
NODE_DB="$TESTS_NODE_DB" | ||
export NODE_DB | ||
|
||
WALLET_DB="$(pwd)/state/wallet_db" | ||
mkdir -p "$WALLET_DB" | ||
export WALLET_DB | ||
|
||
WALLET_PORT=$(shuf -i 2000-65000 -n 1) | ||
export WALLET_PORT | ||
|
||
USER_ID=$(id -u) | ||
export USER_ID | ||
|
||
NODE_SOCKET_DIR=$(mktemp -d /tmp/node-preprod.XXXXXX) | ||
export NODE_SOCKET_DIR | ||
|
||
NODE_SOCKET_NAME="node.socket" | ||
export NODE_SOCKET_NAME | ||
|
||
WALLET_APP="e2e_tests-$WALLET_PORT" | ||
export WALLET_APP | ||
|
||
docker-compose down || true | ||
|
||
docker-compose up -d | ||
|
||
mkdir -p "$(pwd)/logs" | ||
|
||
TESTS_LOGDIR="$(pwd)/logs" | ||
export TESTS_LOGDIR | ||
|
||
CARDANO_NODE_CONFIGS="$(pwd)/configs/cardano" | ||
export CARDANO_NODE_CONFIGS | ||
|
||
VERSION=$(buildkite-agent meta-data get "release-version") | ||
|
||
TESTS_E2E_BINDIR="$(pwd)/cardano-wallet-$VERSION-linux64" | ||
export TESTS_E2E_BINDIR | ||
|
||
cd test/e2e | ||
|
||
CARDANO_NODE_SOCKET_PATH="$NODE_SOCKET_DIR/$NODE_SOCKET_NAME" | ||
export CARDANO_NODE_SOCKET_PATH | ||
|
||
TESTS_E2E_STATEDIR=$(pwd)/state | ||
export TESTS_E2E_STATEDIR | ||
|
||
TESTS_E2E_TOKEN_METADATA=https://metadata.world.dev.cardano.org/ | ||
export TESTS_E2E_TOKEN_METADATA | ||
|
||
TESTS_E2E_FIXTURES="$FIXTURE_DECRYPTION_KEY" | ||
|
||
export TESTS_E2E_FIXTURES | ||
|
||
nix develop -c rake wait_until_node_synced | ||
nix develop -c rake spec | ||
|
||
docker-compose down | ||
|
||
rm -rf "$NODE_SOCKET_DIR" |
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