Skip to content

Commit

Permalink
Merge pull request #487 from ava-labs/doc-goreleaser-local
Browse files Browse the repository at this point in the history
Fixup release flow
  • Loading branch information
feuGeneA authored Sep 12, 2024
2 parents 885999b + 89c7a91 commit dbfddd4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,33 @@ Running the tests locally doesn't require publishing the `subnet-evm` commit sin
> Locally running E2E tests using local checkout of `subnet-evm` will install `avalanchego` version specified by the `AVALANCHEGO_VERSION` in that working tree's `./scripts/versions.sh`.
> [!TIP]
> Using the local checkout it's possible to run tests against a `tmpnet` consisting of nodes using a different version of `avalanchego` than the application being tested which might be helpful when troubleshooting.
> Using the local checkout it's possible to run tests against a `tmpnet` consisting of nodes using a different version of `avalanchego` than the application being tested which might be helpful when troubleshooting.
## Releases
GoReleaser is used to build the binaries of the services and also Docker images with those binaries. The monorepo feature of GoReleaser Pro is used to automate the release flow in response to tags like `signature-aggregator/v0.0.0`. The release actions in .github/workflows automate this, but the release build can also be run locally. Be sure to install the "pro" distribution of the command line utility, so that it can parse the `monorepo` key. For example:

```bash
$ goreleaser release --single-target --clean --snapshot --config signature-aggregator/.goreleaser.yml
...
• creating archive=dist/linux_amd64/signature-aggregator_0.1.0-rc0-SNAPSHOT-3c2ae78_linux_amd64.tar.gz
• docker images
• building docker image image=avaplatform/signature-aggregator:v0.1.0-rc0-amd64
```

Then:

```bash
$ docker run -v $(pwd)/signature-aggregator/sample-signature-aggregator-config.json:/config.json avaplatform/signature-aggregator:v0.1.0-rc0-amd64 --config-file /config.json
{"level":"info","timestamp":"2024-09-11T22:25:03.001Z","logger":"signature-aggregator","caller":"main/main.go:76","msg":"Initializing signature-aggregator"}
{"level":"info","timestamp":"2024-09-11T22:25:03.001Z","logger":"signature-aggregator","caller":"main/main.go:79","msg":"Initializing app request network"}
{"level":"debug","timestamp":"2024-09-11T22:25:03.086Z","logger":"p2p-network","caller":"dialer/dialer.go:52","msg":"creating dialer","throttleRPS":50,"dialTimeout":30000000000}
{"level":"info","timestamp":"2024-09-11T22:25:03.086Z","logger":"signature-aggregator","caller":"main/main.go:134","msg":"Initialization complete"}
```

Or, for the relayer:

```bash
$ goreleaser release --single-target --clean --snapshot --config relayer/.goreleaser.yml
...
$ docker run -v $(pwd)/sample-relayer-config.json:/config.json avaplatform/awm-relayer:v1.0.4-test12-amd64 --config-file /config.json
```
3 changes: 2 additions & 1 deletion relayer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM debian:11-slim
FROM debian:12-slim
RUN apt update && apt --yes install ca-certificates
COPY awm-relayer /usr/bin/awm-relayer
EXPOSE 8080
USER 1001
Expand Down
3 changes: 2 additions & 1 deletion signature-aggregator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM debian:11-slim
FROM debian:12-slim
COPY signature-aggregator /usr/bin/signature-aggregator
RUN apt update && apt --yes install ca-certificates
EXPOSE 8080
EXPOSE 8081
CMD ["start"]
Expand Down

0 comments on commit dbfddd4

Please sign in to comment.