-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…10552) * build: fix build environment for the liveness test (#10551) Extracted from #10210. Make the test more reproducible, so that it does not require coordination between the build container and the run container. - Use layers to more advantage. - Include bash in the run container. - Put writable output onto a volume. (cherry picked from commit 70a3a90) # Conflicts: # Makefile * fix conflict Co-authored-by: M. J. Fromberger <[email protected]> Co-authored-by: Robert Zaremba <[email protected]>
- Loading branch information
1 parent
6a46c95
commit 3ae5e0c
Showing
6 changed files
with
26 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,7 +219,7 @@ jobs: | |
|
||
liveness-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
all: simd-env | ||
|
||
simd-env: | ||
docker build --build-arg UID=$(shell id -u) --build-arg GID=$(shell id -g) --tag cosmossdk/simd-env simd-env | ||
docker build --tag cosmossdk/simd-env -f simd-env/Dockerfile \ | ||
$(shell git rev-parse --show-toplevel) | ||
|
||
.PHONY: all simd-env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
FROM ubuntu:18.04 | ||
FROM golang:1.17-alpine AS build | ||
RUN apk add build-base git linux-headers | ||
WORKDIR /work | ||
COPY go.mod go.sum /work/ | ||
COPY db/go.mod db/go.sum /work/db/ | ||
RUN go mod download | ||
COPY ./ /work | ||
RUN LEDGER_ENABLED=false make clean build | ||
|
||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y install curl jq file | ||
FROM alpine:3.14 AS run | ||
RUN apk add bash curl jq | ||
COPY contrib/images/simd-env/wrapper.sh /usr/bin/wrapper.sh | ||
|
||
ARG UID=1000 | ||
ARG GID=1000 | ||
|
||
USER ${UID}:${GID} | ||
VOLUME [ "/simd" ] | ||
VOLUME /simd | ||
COPY --from=build /work/build/simd /simd/ | ||
WORKDIR /simd | ||
|
||
EXPOSE 26656 26657 | ||
ENTRYPOINT ["/usr/bin/wrapper.sh"] | ||
CMD ["start", "--log_format", "plain"] | ||
STOPSIGNAL SIGTERM | ||
|
||
COPY wrapper.sh /usr/bin/wrapper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters