mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge pull request #91 from tomochain/feature/bootnodeimage
Add new pipeline for bootnode binary
This commit is contained in:
commit
f8074122af
5 changed files with 32 additions and 35 deletions
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
- while sleep 540; do echo "[ still running ]"; done &
|
- while sleep 540; do echo "[ still running ]"; done &
|
||||||
- go run build/ci.go test -coverage
|
- go run build/ci.go test -coverage
|
||||||
- kill %1
|
- kill %1
|
||||||
- stage: Build and push Docker image
|
- stage: Build and push tomochain/tomochain and tomochain/bootnode containers
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
before_install:
|
before_install:
|
||||||
|
|
@ -49,7 +49,7 @@ jobs:
|
||||||
script: bash docker_push.sh
|
script: bash docker_push.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
- stage: Trigger rebuild of infrastructure image
|
- stage: Trigger rebuild of tomochain/infra-tomochain image
|
||||||
sudo: false
|
sudo: false
|
||||||
script: bash docker_rebuild.sh
|
script: bash docker_rebuild.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,6 @@ RUN chmod +x /usr/local/bin/tomo
|
||||||
EXPOSE 8545
|
EXPOSE 8545
|
||||||
EXPOSE 30303
|
EXPOSE 30303
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/tomo", "--help"]
|
ENTRYPOINT ["/usr/local/bin/tomo"]
|
||||||
|
|
||||||
|
CMD ["--help"]
|
||||||
|
|
|
||||||
22
Dockerfile.bootnode
Normal file
22
Dockerfile.bootnode
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
FROM golang:1.10-alpine as builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache make gcc musl-dev linux-headers
|
||||||
|
|
||||||
|
ADD . /tomochain
|
||||||
|
RUN cd /tomochain && make bootnode
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
LABEL maintainer="etienne@tomochain.com"
|
||||||
|
|
||||||
|
WORKDIR /tomochain
|
||||||
|
|
||||||
|
COPY --from=builder /tomochain/build/bin/bootnode /usr/local/bin/bootnode
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/bootnode
|
||||||
|
|
||||||
|
EXPOSE 30301
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/bootnode"]
|
||||||
|
|
||||||
|
CMD ["--help"]
|
||||||
5
Makefile
5
Makefile
|
|
@ -21,6 +21,11 @@ tomo:
|
||||||
@echo "Done building."
|
@echo "Done building."
|
||||||
@echo "Run \"$(GOBIN)/tomo\" to launch tomo."
|
@echo "Run \"$(GOBIN)/tomo\" to launch tomo."
|
||||||
|
|
||||||
|
bootnode:
|
||||||
|
build/env.sh go run build/ci.go install ./cmd/bootnode
|
||||||
|
@echo "Done building."
|
||||||
|
@echo "Run \"$(GOBIN)/bootnode\" to launch a bootnode."
|
||||||
|
|
||||||
swarm:
|
swarm:
|
||||||
build/env.sh go run build/ci.go install ./cmd/swarm
|
build/env.sh go run build/ci.go install ./cmd/swarm
|
||||||
@echo "Done building."
|
@echo "Done building."
|
||||||
|
|
|
||||||
32
circle.yml
32
circle.yml
|
|
@ -1,32 +0,0 @@
|
||||||
machine:
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
cache_directories:
|
|
||||||
- "~/.ethash" # Cache the ethash DAG generated by hive for consecutive builds
|
|
||||||
- "~/.docker" # Cache all docker images manually to avoid lengthy rebuilds
|
|
||||||
override:
|
|
||||||
# Restore all previously cached docker images
|
|
||||||
- mkdir -p ~/.docker
|
|
||||||
- for img in `ls ~/.docker`; do docker load -i ~/.docker/$img; done
|
|
||||||
|
|
||||||
# Pull in and hive, restore cached ethash DAGs and do a dry run
|
|
||||||
- go get -u github.com/karalabe/hive
|
|
||||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && mkdir -p workspace/ethash/ ~/.ethash)
|
|
||||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.ethash/. workspace/ethash/)
|
|
||||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=NONE --test=. --sim=. --loglevel=6)
|
|
||||||
|
|
||||||
# Cache all the docker images and the ethash DAGs
|
|
||||||
- for img in `docker images | grep -v "^<none>" | tail -n +2 | awk '{print $1}'`; do docker save $img > ~/.docker/`echo $img | tr '/' ':'`.tar; done
|
|
||||||
- cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/ethash/. ~/.ethash
|
|
||||||
|
|
||||||
test:
|
|
||||||
override:
|
|
||||||
# Build Geth and move into a known folder
|
|
||||||
- make geth
|
|
||||||
- cp ./build/bin/geth $HOME/geth
|
|
||||||
|
|
||||||
# Run hive and move all generated logs into the public artifacts folder
|
|
||||||
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/geth --test=. --sim=.)
|
|
||||||
- cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS
|
|
||||||
Loading…
Reference in a new issue