Skip to content

Commit

Permalink
Merge pull request #1433 from mesg-foundation/dev
Browse files Browse the repository at this point in the history
Release v0.16.0
  • Loading branch information
Nicolas Mahé authored Oct 25, 2019
2 parents 9062446 + 2f6068e commit a8a2500
Show file tree
Hide file tree
Showing 224 changed files with 2,647 additions and 20,357 deletions.
65 changes: 7 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

run_on_machine: &run_on_machine
machine:
docker_layer_caching: true
docker_layer_caching: false

run_on_docker: &run_on_docker
docker:
Expand All @@ -12,6 +12,7 @@ restore_go_mod_cache: &restore_go_mod_cache
- restore_cache:
keys:
- go-mod-cache-{{ checksum "go.sum" }}

save_go_mod_cache: &save_go_mod_cache
- save_cache:
key: go-mod-cache-{{ checksum "go.sum" }}
Expand Down Expand Up @@ -42,31 +43,13 @@ jobs:
- checkout
- setup_remote_docker
- run: docker swarm init
- <<: *restore_go_cache
- <<: *restore_go_mod_cache
- run: go mod download
- run: make test
- <<: *save_go_mod_cache
- run: mkdir -p ~/.mesg
- <<: *restore_go_cache
- run: go test -v -timeout 300s -coverprofile=coverage.txt ./...
- <<: *save_go_cache
- run: bash <(curl -s https://codecov.io/bash)

"test_integration":
<<: *run_on_docker
environment:
- GOCACHE: *go_cache_dir
steps:
- checkout
- setup_remote_docker
- run: docker swarm init
- run: docker build -t sleep docker-images/sleep/
- run: docker build -t http-server docker-images/http-server/
- <<: *restore_go_mod_cache
- run: go mod download
- <<: *save_go_mod_cache
- run: mkdir -p ~/.mesg
- run: go test -v -timeout 300s -p 1 -tags=integration ./...

"lint":
docker:
- image: golangci/golangci-lint:v1.18
Expand All @@ -75,27 +58,21 @@ jobs:
steps:
- checkout
- <<: *restore_go_mod_cache
- run: go mod download
- <<: *save_go_mod_cache
- run: golangci-lint run
- run: make lint

"publish_docker_dev":
<<: *run_on_machine
steps:
- checkout
- run: docker build -t mesg/engine:dev --build-arg version="dev build `echo $CIRCLE_SHA1 | cut -c1-7`" .
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: docker push mesg/engine:dev
- run: make docker-publish-dev version=`echo $CIRCLE_SHA1 | cut -c1-7`

"publish_docker_prod":
<<: *run_on_machine
steps:
- checkout
- run: docker build -t mesg/engine:$CIRCLE_TAG -t mesg/engine:latest -t `echo mesg/engine:$CIRCLE_TAG | cut -d'.' -f1-2` --build-arg version=$CIRCLE_TAG .
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: docker push mesg/engine:$CIRCLE_TAG
- run: docker push `echo mesg/engine:$CIRCLE_TAG | cut -d'.' -f1-2`
- run: docker push mesg/engine:latest
- run: make docker-publish version=$CIRCLE_TAG

workflows:
version: 2
Expand All @@ -118,14 +95,6 @@ workflows:
ignore:
- "dev"
- "master"
- "test_integration":
filters:
tags:
ignore: /.*/
branches:
ignore:
- "dev"
- "master"

release_dev:
jobs:
Expand All @@ -141,16 +110,9 @@ workflows:
ignore: /.*/
branches:
only: dev
- "test_integration":
filters:
tags:
ignore: /.*/
branches:
only: dev
- "publish_docker_dev":
requires:
- "test"
- "test_integration"
- "lint"

test_prod:
Expand All @@ -161,12 +123,6 @@ workflows:
ignore: /.*/
branches:
only: master
- "test_integration":
filters:
tags:
ignore: /.*/
branches:
only: master
- "lint":
filters:
tags:
Expand All @@ -188,17 +144,10 @@ workflows:
only: /^v.*/
branches:
ignore: /.*/
- "test_integration":
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- "publish_docker_prod":
requires:
- "test"
- "lint"
- "test_integration"
filters:
tags:
only: /^v.*/
Expand Down
File renamed without changes.
39 changes: 28 additions & 11 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
Dockerfile
Dockerfile-dev
.circleci
.vscode

# repo files
README.md
CHANGELOG.md
CONTRIBUTING.md
schema1.svg
.github

/scripts
/examples
/test
dev
mesg-dev
.git

# test & debug files
**/*_test.go
**/*.test
**/debug
**/node_modules
bin/cli
docs/
docker-images/
.tendermint-validator/
/docker-images
/test
/vendor
coverage.txt

# configuration & repo files
Makefile
.circleci
.codacy.yml
.codeclimate.yml
.codecov.yml
.git
.gitignore
.golangci.yml
.genesis
.vscode
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
coverage.txt

.vscode
debug
Expand All @@ -23,8 +24,11 @@ node_modules
vendor
tmp-systemservices

# tendermint
.tendermint-validator/
# genesis
.genesis

# gogo extension
gogo/
gogo/

main
engine
8 changes: 2 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
run:
tests: true
build-tags:
- integration
skip-dirs:
- commands/provider/assets/
- protobuf/
- service/importer/assets/
skip-files:
- ".*.pb.go$"

linters-settings:
govet:
Expand Down
34 changes: 32 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,43 @@
# Changelog

## [Unreleased](https://github.com/mesg-foundation/engine/compare/master...dev)
## [v0.16.0](https://github.com/mesg-foundation/engine/releases/tag/v0.16.0)

#### Breaking Changes

- ([#1361](https://github.com/mesg-foundation/engine/pull/1361)) Remove system services and deprecated service sdk.
- ([#1364](https://github.com/mesg-foundation/engine/pull/1364)) Remove core api.
- ([#1375](https://github.com/mesg-foundation/engine/pull/1375)) Simplify service hash calculation.
- ([#1381](https://github.com/mesg-foundation/engine/pull/1381)) Remove service deletion function.
- ([#1416](https://github.com/mesg-foundation/engine/pull/1416)) Read config from file instead of env.

#### Added

- ([#1355](https://github.com/mesg-foundation/engine/pull/1355)) Add credential using grpc metadata.
- ([#1368](https://github.com/mesg-foundation/engine/pull/1368)) Add ownership SDK and API.
- ([#1380](https://github.com/mesg-foundation/engine/pull/1380)) Add configuration validation.
- ([#1384](https://github.com/mesg-foundation/engine/pull/1384)) Add service exists api.

#### Changed

- ([#1357](https://github.com/mesg-foundation/engine/pull/1357)) Update dependencies.
- ([#1371](https://github.com/mesg-foundation/engine/pull/1371)) Remove shared private info of the genesis account to generate the genesis.
- ([#1391](https://github.com/mesg-foundation/engine/pull/1391)) Improve generate genesis script.
- ([#1400](https://github.com/mesg-foundation/engine/pull/1400)) Container package refactor.
- ([#1402](https://github.com/mesg-foundation/engine/pull/1402)) Run scripts from Makefile.
- ([#1412](https://github.com/mesg-foundation/engine/pull/1412)) Load genesis from file and generate it if it doesn't exist.
- ([#1430](https://github.com/mesg-foundation/engine/pull/1430)) Set block creation time to 1s instead of 10s.
- ([#1431](https://github.com/mesg-foundation/engine/pull/1431)) Update dependencies.

#### Fixed

- ([#1360](https://github.com/mesg-foundation/engine/pull/1360)) Fix copy of folder in dev script.

#### Removed
#### Experimental

- ([#1370](https://github.com/mesg-foundation/engine/pull/1370)) Remove system service sources.
- ([#1373](https://github.com/mesg-foundation/engine/pull/1373)) Remove not used service-test.
- ([#1414](https://github.com/mesg-foundation/engine/pull/1414)) Remove not used functions from xos package.
- ([#1428](https://github.com/mesg-foundation/engine/pull/1428)) Remove deprecated `MESG_ENDPOINT_TCP` from service env.

## [v0.15.0](https://github.com/mesg-foundation/engine/releases/tag/v0.15.0)

Expand Down
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# base Go image version.
FROM golang:1.13.0-stretch AS build

RUN apt-get update && \
apt-get install -y jq && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /project

# install dependencies
Expand All @@ -14,14 +9,13 @@ RUN go mod download

COPY . .
ARG version
ENV version=${version}
RUN ./scripts/build-engine.sh
RUN go build -mod=readonly -o ./bin/engine -ldflags="-X 'github.com/mesg-foundation/engine/version.Version=$version'" core/main.go

FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20180409 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /project/engine .
COPY --from=build /project/bin/engine .
CMD ["./engine"]
13 changes: 6 additions & 7 deletions Dockerfile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ FROM golang:1.13.0-stretch

WORKDIR /project

# install dependencies
COPY go.mod go.sum ./
RUN go mod download

VOLUME /project

# install some dependencies from apt-get.
Expand All @@ -16,7 +12,7 @@ RUN apt-get update -y && \

# protobuf(protoc) version.
ARG protobuf=3.9.1
ARG gogoprotobuf=1.3.0
ARG gogoprotobuf=1.3.1

# install protobuf(protoc).
RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v$protobuf/protoc-$protobuf-linux-x86_64.zip -O /tmp/protobuf.zip && \
Expand All @@ -27,7 +23,7 @@ RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v$prot
rm -rf /tmp/protobuf

RUN cd /tmp/ && \
git clone https://github.com/krhubert/protobuf.git && \
git clone https://github.com/gogo/protobuf.git && \
cd protobuf && \
make install && \
mkdir -p /usr/local/include/gogo/protobuf/ && \
Expand All @@ -38,7 +34,10 @@ RUN mkdir -p /usr/local/include/gogo/protobuf/ && \
wget -qO- https://github.com/gogo/protobuf/archive/v${gogoprotobuf}.tar.gz | tar -xzf - protobuf-${gogoprotobuf}/gogoproto/gogo.proto && \
mv protobuf-${gogoprotobuf}/gogoproto /usr/local/include/gogo/protobuf/

RUN go install github.com/go-bindata/go-bindata/go-bindata
# install dependencies
COPY go.mod go.sum ./
RUN go mod download

RUN go install github.com/golang/protobuf/protoc-gen-go
RUN go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
RUN go install github.com/vektra/mockery/.../
Expand Down
Loading

0 comments on commit a8a2500

Please sign in to comment.