From a3e1b99f6ad0d152551c336f4c963213b2a940e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Toledano?= Date: Tue, 8 Nov 2022 09:24:27 +0100 Subject: [PATCH] test: integrate rosetta-cli into rosetta-ci (#13785) * add: rosetta-cli to rosetta-ci image * update: rosetta readme * doc: rosetta readme * update: rosetta-cli v0.10.0 * Update contrib/rosetta/README.md Co-authored-by: Julien Robert Co-authored-by: Julien Robert --- contrib/rosetta/README.md | 7 ++----- contrib/rosetta/configuration/rosetta.json | 2 +- contrib/rosetta/docker-compose.yaml | 2 +- contrib/rosetta/rosetta-ci/Dockerfile | 11 ++++++++++- contrib/rosetta/rosetta-cli/Dockerfile | 18 ------------------ 5 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 contrib/rosetta/rosetta-cli/Dockerfile diff --git a/contrib/rosetta/README.md b/contrib/rosetta/README.md index 60c5059c1e28..77955b1b4394 100644 --- a/contrib/rosetta/README.md +++ b/contrib/rosetta/README.md @@ -17,11 +17,8 @@ Contains the required files to set up rosetta cli and make it work against its w ## Rosetta-ci -Contains the files for a deterministic network, with fixed keys and some actions on there, to test parsing of msgs and historical balances. This image is used to run a simapp node and to run the rosetta server. - -## Rosetta-cli - -The docker image for ./rosetta-cli/Dockerfile is on [docker hub](https://hub.docker.com/r/tendermintdev/rosetta-cli). Whenever rosetta-cli releases a new version, rosetta-cli/Dockerfile should be updated to reflect the new version and pushed to docker hub. +Contains the files for a deterministic network, with fixed keys and some actions on there, to test parsing of msgs and historical balances. This image is used to run a simapp node and to run the rosetta server and the rosetta-cli. +Whenever [rosetta-cli](https://github.com/coinbase/rosetta-cli) releases a new version, rosetta-ci/Dockerfile should be updated to reflect the new version. ## Notes diff --git a/contrib/rosetta/configuration/rosetta.json b/contrib/rosetta/configuration/rosetta.json index b4adc6a756f1..5802c3c90dff 100644 --- a/contrib/rosetta/configuration/rosetta.json +++ b/contrib/rosetta/configuration/rosetta.json @@ -41,7 +41,7 @@ "bootstrap_balances": "bootstrap.json", "interesting_accounts": "", "reconciliation_disabled": false, - "inactive_discrepency_search_disabled": false, + "inactive_discrepancy_search_disabled": false, "balance_tracking_disabled": false, "coin_tracking_disabled": false, "end_conditions": { diff --git a/contrib/rosetta/docker-compose.yaml b/contrib/rosetta/docker-compose.yaml index fabb36b0aa6c..bfeca6a7ff9d 100644 --- a/contrib/rosetta/docker-compose.yaml +++ b/contrib/rosetta/docker-compose.yaml @@ -32,7 +32,7 @@ services: - 8080 test_rosetta: - image: tendermintdev/rosetta-cli:v0.6.7 + image: rosetta-ci:latest volumes: - ./configuration:/rosetta/config:z command: ["./config/run_tests.sh"] diff --git a/contrib/rosetta/rosetta-ci/Dockerfile b/contrib/rosetta/rosetta-ci/Dockerfile index 4b085ccaa053..951f135881f2 100644 --- a/contrib/rosetta/rosetta-ci/Dockerfile +++ b/contrib/rosetta/rosetta-ci/Dockerfile @@ -1,6 +1,14 @@ FROM golang:1.19-alpine as build -RUN apk add --no-cache tar git +RUN apk add git tar gcc libc-dev --no-cache + +ARG ROSETTA_VERSION="v0.10.0" + +# build rosetta CLI +WORKDIR /rosetta +RUN git clone https://github.com/coinbase/rosetta-cli . +RUN git checkout tags/$ROSETTA_VERSION +RUN go build -o rosetta-cli ./main.go # prepare node data WORKDIR /node @@ -17,6 +25,7 @@ RUN apk add gcc git libc-dev python3 --no-cache ENV PATH=$PATH:/bin +COPY --from=build /rosetta/rosetta-cli /bin/rosetta-cli COPY --from=build /simd/simapp/simd/simd /bin/simd WORKDIR /rosetta diff --git a/contrib/rosetta/rosetta-cli/Dockerfile b/contrib/rosetta/rosetta-cli/Dockerfile deleted file mode 100644 index f4fc15d9bced..000000000000 --- a/contrib/rosetta/rosetta-cli/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM golang:1.19-alpine as build - -RUN apk add git gcc libc-dev --no-cache - -ARG ROSETTA_VERSION="v0.7.3" - -# build rosetta CLI -WORKDIR /rosetta -RUN git clone https://github.com/coinbase/rosetta-cli . -RUN git checkout tags/$ROSETTA_VERSION -RUN go build -o rosetta-cli ./main.go - -FROM alpine -RUN apk add gcc libc-dev python3 --no-cache - -ENV PATH=$PATH:/bin - -COPY --from=build /rosetta/rosetta-cli /bin/rosetta-cli