Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Nov 25, 2024
1 parent 2ed5e14 commit ac9a658
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion common/soroban-rpc/bin/start
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion start
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ac9a658

Please sign in to comment.