Skip to content

Commit 4e12190

Browse files
committed
chore(e2e): use custom CLI
This is meant as a temporary solution until the CardanoNode embedded cardano-cli does not have [this issue](IntersectMBO/cardano-cli#825) anymore, so cardano-cli 9.0.0.2 or higher. Since cardano-cli 9.0.0.1 which has the fix cannot be used because it is dynamically linked, and there is no newer release, I am forced to embed a customly built cardano-cli to be used for bootstrapping the local-network. We can remove the locally built cardano-cli when we have cli 9.0.0.2, and revert this whole commit once it is embedded in cardano-node.
1 parent 71b4a30 commit 4e12190

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

packages/e2e/local-network/Dockerfile

+29-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,40 @@ ENV DEBIAN_FRONTEND=nonintercative
66

77
WORKDIR /build
88
ARG CARDANO_NODE_BUILD_URL=https://github.com/IntersectMBO/cardano-node/releases/download/9.0.0/cardano-node-9.0.0-linux.tar.gz
9+
ARG CARDANO_CLI_BUILD_URL=https://github.com/IntersectMBO/cardano-cli/releases/download/cardano-cli-9.0.0.1/cardano-cli-9.0.0.1-x86_64-linux.tar.gz
910
ARG CARDANO_NODE_BUILD_URL_ARM64=https://github.com/input-output-hk/ogmios-tracker/releases/download/0.1.0/cardano-node-9.0.0-aarch64-linux.tar.gz
1011

11-
RUN apt-get update -y && \
12-
apt-get install -y wget tar curl && \
12+
# Use local cardano-cli until it is available in the official release
13+
COPY cardano-cli-x86_64-linux.zip cardano-cli-x86_64-linux.zip
14+
15+
RUN set -x && \
16+
apt-get update -y && \
17+
apt-get install -y wget tar curl unzip && \
1318
if [ "$(uname -m)" = "aarch64" ] ; then \
14-
curl -fsSL "$CARDANO_NODE_BUILD_URL_ARM64" >cardano-node.tar.gz ;\
15-
else \
16-
curl -fsSL "$CARDANO_NODE_BUILD_URL" >cardano-node.tar.gz ;\
19+
curl -fsSL "$CARDANO_NODE_BUILD_URL_ARM64" >cardano-node.tar.gz ;\
20+
else \
21+
curl -fsSL "$CARDANO_NODE_BUILD_URL" >cardano-node.tar.gz ;\
1722
fi && \
1823
mkdir -p cardano-node && \
19-
tar -xzf cardano-node.tar.gz -C cardano-node
24+
tar -xzf cardano-node.tar.gz -C cardano-node && \
25+
if [ "$(uname -m)" = "x86_64" ] ; then \
26+
echo "======== Check if we want a custom cardano-cli ========" &&\
27+
if [ -f cardano-cli-x86_64-linux.zip ] ; then \
28+
echo "======== Using local cardano-cli ========" && \
29+
unzip cardano-cli-x86_64-linux.zip ;\
30+
elif [ -n "$CARDANO_CLI_BUILD_URL" ] ; then \
31+
echo "======== Using released cardano-cli ========" && \
32+
curl -fsSL "$CARDANO_CLI_BUILD_URL" >cardano-cli.tar.gz && \
33+
tar -xzf cardano-cli.tar.gz ;\
34+
fi && \
35+
if [ -f cardano-cli-x86_64-linux ] ; then \
36+
echo "======== Using a custom Cardano Node cardano-cli ========" && \
37+
chown $(stat -c "%u:%g" cardano-node/bin/cardano-cli) cardano-cli-x86_64-linux && \
38+
chmod +x cardano-cli-x86_64-linux && \
39+
mv cardano-cli-x86_64-linux cardano-node/bin/cardano-cli ;\
40+
fi ;\
41+
fi
42+
2043

2144
FROM ubuntu:${UBUNTU_VERSION}
2245

Binary file not shown.

0 commit comments

Comments
 (0)