mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Add new pipeline for bootnode binary
This commit is contained in:
parent
b28c4af0f7
commit
0d6c8898eb
6 changed files with 36 additions and 35 deletions
|
|
@ -38,18 +38,20 @@ jobs:
|
|||
- while sleep 540; do echo "[ still running ]"; done &
|
||||
- go run build/ci.go test -coverage
|
||||
- kill %1
|
||||
- stage: Build and push Docker image
|
||||
- stage: Build and push tomochain/tomochain and tomochain/bootnode containers
|
||||
services:
|
||||
- docker
|
||||
before_install:
|
||||
- docker build -t tomochain/tomochain .
|
||||
- docker run tomochain/tomochain
|
||||
- docker build -t tomochain/bootnode .
|
||||
- docker run tomochain/bootnode
|
||||
deploy:
|
||||
provider: script
|
||||
script: bash docker_push.sh
|
||||
on:
|
||||
branch: master
|
||||
- stage: Trigger rebuild of infrastructure image
|
||||
- stage: Trigger rebuild of tomochain/infra-tomochain image
|
||||
sudo: false
|
||||
script: bash docker_rebuild.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -18,4 +18,6 @@ RUN chmod +x /usr/local/bin/tomo
|
|||
EXPOSE 8545
|
||||
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 "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:
|
||||
build/env.sh go run build/ci.go install ./cmd/swarm
|
||||
@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
|
||||
|
|
@ -5,3 +5,5 @@ docker tag tomochain/tomochain tomochain/tomochain:latest
|
|||
docker tag tomochain/tomochain tomochain/tomochain:$TRAVIS_BUILD_ID
|
||||
docker push tomochain/tomochain:latest
|
||||
docker push tomochain/tomochain:$TRAVIS_BUILD_ID
|
||||
docker tag tomochain/bootnode tomochain/bootnode:latest
|
||||
docker push tomochain/bootnode:latest
|
||||
|
|
|
|||
Loading…
Reference in a new issue