This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #646 from hyperledger/develop
Release 0.17.0
- Loading branch information
Showing
143 changed files
with
3,636 additions
and
2,598 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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Some resuable sections, note the top-level keys 'defaults' and 'tag_filters' | ||
# have no special meaning, they just exist so I can alias them and import them | ||
# in later blocks | ||
defaults: &defaults | ||
working_directory: /go/src/github.com/hyperledger/burrow | ||
docker: | ||
- image: circleci/golang:1.8.1 | ||
|
||
tag_filters: &tags_filters | ||
tags: | ||
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ | ||
|
||
version: 2 | ||
jobs: | ||
checkout_code: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: go get github.com/Masterminds/glide | ||
- run: glide install | ||
|
||
# Just persist the entire working dir (burrow checkout) | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- . | ||
test: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: make test | ||
|
||
test_integration: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: make test_integration | ||
|
||
release: | ||
<<: *defaults | ||
steps: | ||
# restore checkout | ||
- attach_workspace: | ||
at: . | ||
# This allows us to perform our docker builds | ||
- setup_remote_docker: | ||
version: 17.06.1-ce | ||
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io | ||
# build docker image and tag the image with the version, date, and commit hash | ||
- run: make build_docker_db | ||
- run: docker push quay.io/monax/db | ||
|
||
|
||
workflows: | ||
version: 2 | ||
|
||
test_and_release: | ||
jobs: | ||
- checkout_code: | ||
# Rather annoyingly we need this boilerplate on all transitive | ||
# dependencies if we want the deploy job to build against a version | ||
# tag. | ||
# Also note jobs build against all branches by default | ||
filters: | ||
<<: *tags_filters | ||
- test: | ||
requires: | ||
- checkout_code | ||
filters: | ||
<<: *tags_filters | ||
|
||
- test_integration: | ||
requires: | ||
- checkout_code | ||
filters: | ||
<<: *tags_filters | ||
|
||
- release: | ||
requires: | ||
- test | ||
- test_integration | ||
filters: | ||
<<: *tags_filters | ||
branches: | ||
# Although we seem to exclude the master branch below, since | ||
# matching on tags is independent we will still build tags that | ||
# happen to point to a commit on master | ||
# We push dev pre-release images for every commit on develop | ||
only: develop | ||
|
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,9 +1,14 @@ | ||
.github | ||
.git | ||
.gitignore | ||
.project | ||
run.sh | ||
build | ||
build_tool.sh | ||
Makefile | ||
Vagrantfile | ||
Dockerfile | ||
CHANGELOG.md | ||
README.md | ||
circle.yml | ||
api.md | ||
.circleci | ||
docs | ||
vendor |
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,18 +1,38 @@ | ||
FROM quay.io/monax/build:0.16 | ||
# We use a multistage build to avoid bloating our deployment image with build dependencies | ||
FROM golang:1.9.0-alpine3.6 as builder | ||
MAINTAINER Monax <[email protected]> | ||
|
||
ENV TARGET burrow | ||
ENV REPO $GOPATH/src/github.com/hyperledger/$TARGET | ||
RUN apk add --no-cache --update git | ||
RUN go get github.com/Masterminds/glide | ||
|
||
ADD ./glide.yaml $REPO/ | ||
ADD ./glide.lock $REPO/ | ||
ENV REPO $GOPATH/src/github.com/hyperledger/burrow | ||
COPY . $REPO | ||
WORKDIR $REPO | ||
RUN glide install | ||
|
||
COPY . $REPO/. | ||
RUN cd $REPO/cmd/$TARGET && \ | ||
go build --ldflags '-extldflags "-static"' -o $INSTALL_BASE/$TARGET | ||
# Build purely static binaries | ||
RUN go build --ldflags '-extldflags "-static"' -o bin/burrow ./cmd/burrow | ||
RUN go build --ldflags '-extldflags "-static"' -o bin/burrow-client ./client/cmd/burrow-client | ||
|
||
# build customizations start here | ||
RUN cd $REPO/client/cmd/burrow-client && \ | ||
go build --ldflags '-extldflags "-static"' -o $INSTALL_BASE/burrow-client | ||
# This will be our base container image | ||
FROM alpine:3.6 | ||
|
||
# There does not appear to be a way to share environment variables between stages | ||
ENV REPO /go/src/github.com/hyperledger/burrow | ||
|
||
ENV USER monax | ||
ENV MONAX_PATH /home/$USER/.monax | ||
RUN addgroup -g 101 -S $USER && adduser -S -D -u 1000 $USER $USER | ||
VOLUME $MONAX_PATH | ||
WORKDIR $MONAX_PATH | ||
USER $USER:$USER | ||
|
||
# Copy binaries built in previous stage | ||
COPY --from=builder $REPO/bin/* /usr/local/bin/ | ||
|
||
# Expose ports for 1337:burrow API; 46656:tendermint-peer; 46657:tendermint-rpc | ||
EXPOSE 1337 | ||
EXPOSE 46656 | ||
EXPOSE 46657 | ||
|
||
CMD [ "burrow", "serve" ] |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.