From ac9a6587ffa922131e820899b97b5836ab577176 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 25 Nov 2024 22:46:13 +0100 Subject: [PATCH] Address review feedback --- .github/workflows/build.yml | 36 ++++++++++++++++++------------------ Dockerfile | 2 +- Makefile | 4 ++-- common/soroban-rpc/bin/start | 2 +- start | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b67b7ef..8c4e2e83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,7 +163,7 @@ jobs: name: image-stellar-friendbot-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/image - load-stellar-stellar-rpc-from-cache: + load-stellar-rpc-from-cache: runs-on: ubuntu-latest outputs: cache-hit: ${{ steps.cache.outputs.cache-hit }} @@ -172,41 +172,41 @@ jobs: uses: actions/cache@v3 with: path: /tmp/image - key: image-stellar-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} + key: image-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} - name: Upload Stellar-Core Image if: steps.cache.outputs.cache-hit == 'true' uses: actions/upload-artifact@v4 with: - name: image-stellar-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} + name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/image - build-stellar-stellar-rpc: - needs: [load-stellar-stellar-rpc-from-cache] - if: ${{ needs.load-stellar-stellar-rpc-from-cache.outputs.cache-hit != 'true' }} + build-stellar-rpc: + needs: [load-stellar-rpc-from-cache] + if: ${{ needs.load-stellar-rpc-from-cache.outputs.cache-hit != 'true' }} runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-jammy-4-cores-arm64' || 'ubuntu-latest' }} steps: - id: cache uses: actions/cache@v3 with: path: /tmp/image - key: image-stellar-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} + key: image-stellar-rpc-${{ inputs.arch }}-${{ env.STELLAR_RPC_REPO_BRANCH }} - if: inputs.arch == 'arm64' uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 with: platforms: arm64 - uses: docker/setup-buildx-action@5146db6c4d81fbfd508899f851bbb3883a96ff9f - - name: Build Stellar-stellar-rpc Image + - name: Build Stellar-rpc Image run: > docker buildx build --platform linux/${{ inputs.arch }} -f cmd/stellar-rpc/docker/Dockerfile --target build - -t stellar-stellar-rpc:${{ inputs.arch }} + -t stellar-rpc:${{ inputs.arch }} -o type=docker,dest=/tmp/image --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true https://github.com/stellar/stellar-rpc.git#${{ env.STELLAR_RPC_REPO_BRANCH }} - - name: Upload Stellar-stellar-rpc Image + - name: Upload Stellar-rpc Image uses: actions/upload-artifact@v4 with: - name: image-stellar-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} + name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/image load-rs-stellar-xdr-from-cache: @@ -260,7 +260,7 @@ jobs: path: /tmp/image build: - needs: [build-stellar-core, build-stellar-horizon, build-rs-stellar-xdr, build-stellar-friendbot, build-stellar-stellar-rpc] + needs: [build-stellar-core, build-stellar-horizon, build-rs-stellar-xdr, build-stellar-friendbot, build-stellar-rpc] if: always() outputs: image: ${{ steps.image.outputs.name }} @@ -289,19 +289,19 @@ jobs: with: name: image-stellar-friendbot-${{ inputs.tag }}-${{ inputs.arch }} path: /tmp/stellar-friendbot - - name: Download Stellar-stellar-rpc Image + - name: Download Stellar-rpc Image uses: actions/download-artifact@v4 with: - name: image-stellar-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} - path: /tmp/stellar-stellar-rpc + name: image-stellar-rpc-${{ inputs.tag }}-${{ inputs.arch }} + path: /tmp/stellar-rpc - name: Load Stellar-Core Image run: docker load -i /tmp/stellar-core/image - name: Load Stellar-Horizon Image run: docker load -i /tmp/stellar-horizon/image - name: Load Stellar-Friendbot Image run: docker load -i /tmp/stellar-friendbot/image - - name: Load Stellar-stellar-rpc Image - run: docker load -i /tmp/stellar-stellar-rpc/image + - name: Load Stellar-rpc Image + run: docker load -i /tmp/stellar-rpc/image - name: Load Stellar-Rs-Xdr Image run: docker load -i /tmp/stellar-xdr/image - if: inputs.arch == 'arm64' @@ -333,7 +333,7 @@ jobs: --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:${{ inputs.arch }} --build-arg HORIZON_IMAGE_REF=stellar-horizon:${{ inputs.arch }} --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:${{ inputs.arch }} - --build-arg STELLAR_RPC_IMAGE_REF=stellar-stellar-rpc:${{ inputs.arch }} + --build-arg STELLAR_RPC_IMAGE_REF=stellar-rpc:${{ inputs.arch }} - name: Save Quickstart Image run: docker save $IMAGE -o /tmp/image - name: Upload Quickstart Image diff --git a/Dockerfile b/Dockerfile index 881b1026..023604d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ COPY --from=horizon /go/bin/horizon /usr/bin/stellar-horizon COPY --from=friendbot /app/friendbot /usr/local/bin/friendbot -COPY --from=stellar-rpc /bin/stellar-rpc /usr/bin/stellar-stellar-rpc +COPY --from=stellar-rpc /bin/stellar-rpc /usr/bin/stellar-rpc RUN adduser --system --group --quiet --home /var/lib/stellar --disabled-password --shell /bin/bash stellar; diff --git a/Makefile b/Makefile index 9b5f881b..d2d469ad 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ build: --build-arg STELLAR_CORE_IMAGE_REF=stellar-core:$(CORE_REF) \ --build-arg HORIZON_IMAGE_REF=stellar-horizon:$(HORIZON_REF) \ --build-arg FRIENDBOT_IMAGE_REF=stellar-friendbot:$(FRIENDBOT_REF) \ - --build-arg STELLAR_RPC_IMAGE_REF=stellar-stellar-rpc:$(STELLAR_RPC_REF) \ + --build-arg STELLAR_RPC_IMAGE_REF=stellar-rpc:$(STELLAR_RPC_REF) \ build-deps: build-deps-xdr build-deps-core build-deps-horizon build-deps-friendbot build-deps-stellar-rpc @@ -74,4 +74,4 @@ build-deps-friendbot: docker build -t stellar-friendbot:$(FRIENDBOT_REF) -f services/friendbot/docker/Dockerfile https://github.com/stellar/go.git#$(FRIENDBOT_REF) build-deps-stellar-rpc: - docker build -t stellar-stellar-rpc:$(STELLAR_RPC_REF) -f cmd/stellar-rpc/docker/Dockerfile --target build https://github.com/stellar/stellar-rpc.git#$(STELLAR_RPC_REF) --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true + docker build -t stellar-rpc:$(STELLAR_RPC_REF) -f cmd/stellar-rpc/docker/Dockerfile --target build https://github.com/stellar/stellar-rpc.git#$(STELLAR_RPC_REF) --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=true diff --git a/common/soroban-rpc/bin/start b/common/soroban-rpc/bin/start index 78a6867c..15c8878d 100755 --- a/common/soroban-rpc/bin/start +++ b/common/soroban-rpc/bin/start @@ -4,4 +4,4 @@ set -e set -o pipefail echo "starting stellar-rpc..." -exec /usr/bin/stellar-stellar-rpc --config-path=/opt/stellar/stellar-rpc/etc/stellar-rpc.cfg +exec /usr/bin/stellar-rpc --config-path=/opt/stellar/stellar-rpc/etc/stellar-rpc.cfg diff --git a/start b/start index 6c442994..837357cb 100644 --- a/start +++ b/start @@ -77,7 +77,7 @@ function start() { echo " horizon:" echo "$(stellar-horizon version | sed 's/^/ /')" echo " stellar-rpc:" - echo "$(stellar-stellar-rpc version | sed 's/^/ /')" + echo "$(stellar-rpc version | sed 's/^/ /')" echo "mode: $STELLAR_MODE" echo "network: $NETWORK"