Skip to content

Commit

Permalink
Only do exporter jobs and fixup Dockerfile versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Jan 6, 2024
1 parent 52cc470 commit 6567031
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Horizon

on:
push:
branches: [master, lighthorizon]
branches: [master]
pull_request:

jobs:
Expand Down Expand Up @@ -159,22 +159,22 @@ jobs:
name: Push to DockerHub
run: docker push stellar/horizon-verify-range:latest

horizon-light:
name: Test and push the Horizon Light (Zenith) images
ledger-exporter:
name: Test and push the Ledger Exporter images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# For pull requests, build and test the PR head not a merge of the PR with the destination.
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Build and test Horizon Light images
- name: Build and test Ledger Exporter images
# Any range should do for basic testing, this range was chosen pretty early in history so that it only takes a few mins to run
run: |
chmod 755 ./exp/lighthorizon/build/build.sh
mkdir $PWD/ledgerexport
mkdir $PWD/index
# mkdir $PWD/index
./exp/lighthorizon/build/build.sh all stellar latest false
./exp/lighthorizon/build/build.sh ledgerexporter stellar latest false
docker run -e ARCHIVE_TARGET=file:///ledgerexport\
-e START=5\
-e END=150\
Expand All @@ -184,13 +184,13 @@ jobs:
-v $PWD/ledgerexport:/ledgerexport\
stellar/lighthorizon-ledgerexporter
# run map job
docker run -e NETWORK_PASSPHRASE='pubnet' -e JOB_INDEX_ENV=AWS_BATCH_JOB_ARRAY_INDEX -e AWS_BATCH_JOB_ARRAY_INDEX=0 -e BATCH_SIZE=64 -e FIRST_CHECKPOINT=64 \
-e WORKER_COUNT=1 -e RUN_MODE=map -v $PWD/ledgerexport:/ledgermeta -e TXMETA_SOURCE=file:///ledgermeta -v $PWD/index:/index -e INDEX_TARGET=file:///index stellar/lighthorizon-index-batch
# # run map job
# docker run -e NETWORK_PASSPHRASE='pubnet' -e JOB_INDEX_ENV=AWS_BATCH_JOB_ARRAY_INDEX -e AWS_BATCH_JOB_ARRAY_INDEX=0 -e BATCH_SIZE=64 -e FIRST_CHECKPOINT=64 \
# -e WORKER_COUNT=1 -e RUN_MODE=map -v $PWD/ledgerexport:/ledgermeta -e TXMETA_SOURCE=file:///ledgermeta -v $PWD/index:/index -e INDEX_TARGET=file:///index stellar/lighthorizon-index-batch
# run reduce job
docker run -e NETWORK_PASSPHRASE='pubnet' -e JOB_INDEX_ENV=AWS_BATCH_JOB_ARRAY_INDEX -e AWS_BATCH_JOB_ARRAY_INDEX=0 -e MAP_JOB_COUNT=1 -e REDUCE_JOB_COUNT=1 \
-e WORKER_COUNT=1 -e RUN_MODE=reduce -v $PWD/index:/index -e INDEX_SOURCE_ROOT=file:///index -e INDEX_TARGET=file:///index stellar/lighthorizon-index-batch
# # run reduce job
# docker run -e NETWORK_PASSPHRASE='pubnet' -e JOB_INDEX_ENV=AWS_BATCH_JOB_ARRAY_INDEX -e AWS_BATCH_JOB_ARRAY_INDEX=0 -e MAP_JOB_COUNT=1 -e REDUCE_JOB_COUNT=1 \
# -e WORKER_COUNT=1 -e RUN_MODE=reduce -v $PWD/index:/index -e INDEX_SOURCE_ROOT=file:///index -e INDEX_TARGET=file:///index stellar/lighthorizon-index-batch
# Push images
- if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/lighthorizon'
Expand All @@ -204,4 +204,4 @@ jobs:
name: Push to DockerHub
run: |
chmod 755 ./exp/lighthorizon/build/build.sh
./exp/lighthorizon/build/build.sh all stellar latest true
./exp/lighthorizon/build/build.sh ledgerexporter stellar latest true
4 changes: 2 additions & 2 deletions exp/lighthorizon/build/index-batch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.18 AS builder
FROM golang:1.20 AS builder

WORKDIR /go/src/github.com/stellar/go
COPY . ./
RUN go mod download
RUN go install github.com/stellar/go/exp/lighthorizon/index/cmd/batch/map
RUN go install github.com/stellar/go/exp/lighthorizon/index/cmd/batch/reduce

FROM ubuntu:20.04
FROM ubuntu:21.04
ENV DEBIAN_FRONTEND=noninteractive
# ca-certificates are required to make tls connections
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl wget gnupg apt-utils
Expand Down
4 changes: 2 additions & 2 deletions exp/lighthorizon/build/index-single/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.18 AS builder
FROM golang:1.20 AS builder

WORKDIR /go/src/github.com/stellar/go
COPY . ./
RUN go mod download
RUN go install github.com/stellar/go/exp/lighthorizon/index/cmd/single

FROM ubuntu:20.04
FROM ubuntu:21.04

ENV DEBIAN_FRONTEND=noninteractive
# ca-certificates are required to make tls connections
Expand Down
4 changes: 2 additions & 2 deletions exp/lighthorizon/build/ledgerexporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.18 AS builder
FROM golang:1.20 AS builder

WORKDIR /go/src/github.com/stellar/go
COPY . ./
RUN go mod download
RUN go install github.com/stellar/go/exp/services/ledgerexporter

FROM ubuntu:20.04
FROM ubuntu:21.04
ARG STELLAR_CORE_VERSION
ENV STELLAR_CORE_VERSION=${STELLAR_CORE_VERSION:-*}
ENV STELLAR_CORE_BINARY_PATH /usr/bin/stellar-core
Expand Down
4 changes: 2 additions & 2 deletions exp/lighthorizon/build/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.18 AS builder
FROM golang:1.20 AS builder

WORKDIR /go/src/github.com/stellar/go
COPY . ./
RUN go mod download
RUN go install github.com/stellar/go/exp/lighthorizon

FROM ubuntu:20.04
FROM ubuntu:21.04

ENV DEBIAN_FRONTEND=noninteractive
# ca-certificates are required to make tls connections
Expand Down

0 comments on commit 6567031

Please sign in to comment.