Skip to content

Commit

Permalink
Merge pull request #11 from softonic/feature/add-client-certificate-l…
Browse files Browse the repository at this point in the history
…oading

Add client certificate loading
Update dependencies
  • Loading branch information
bvis authored Nov 25, 2020
2 parents f1b7a97 + 3cf6c1a commit 07dad84
Show file tree
Hide file tree
Showing 26 changed files with 817 additions and 130 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ci
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.13.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: on
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
# - name: Cache go modules
# uses: actions/cache@v2
# with:
# path: |
# ~/go/pkg/mod # Module download cache
# ~/.cache/go-build # Build cache (Linux)
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
- name: Build
run: |
sudo apt-get install -y protobuf-compiler
make build
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.29
- name: Test
run: go test -v -race ./...
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ FROM golang:1.13-buster AS build
RUN apt-get update \
&& apt-get install -y protobuf-compiler

COPY ./ /go/src/github.com/softonic/homing-pigeon
WORKDIR /go/src/github.com/softonic/homing-pigeon

RUN cd /go/src/github.com/softonic/homing-pigeon && make build
COPY . .

RUN make build &&\
ln /go/src/github.com/softonic/homing-pigeon/bin/homing-pigeon /

FROM scratch

COPY --from=build /go/src/github.com/softonic/homing-pigeon/bin/homing-pigeon /

ENTRYPOINT ["/homing-pigeon", "-logtostderr"]
ENTRYPOINT ["/homing-pigeon", "-logtostderr"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ In order to start up correctly, it needs well defined environment variables:
| ------------------------------------ | ------------------------------------------------------------------ |
| RABBITMQ_URL | RabbitMQ url string |
| RABBITMQ_CA_PATH | Path to CA used to sign SSL cert for RabbitMQ server |
| RABBITMQ_TLS_CLIENT_CERT | Path to client certificate to connect to RabbitMQ server |
| RABBITMQ_TLS_CLIENT_KEY | Path to client key to connect to RabbitMQ server |
| RABBITMQ_DLX_NAME | RabbitMQ dead letters exchange name |
| RABBITMQ_DLX_QUEUE_NAME | RabbitMQ dead letters exchange's queue name |
| RABBITMQ_EXCHANGE_NAME | RabbitMQ messaging exchange name |
Expand Down Expand Up @@ -140,4 +142,4 @@ $ make test

## Acknowledgments

A special thank you to [Adrià Compte](https://dribbble.com/muniatu), the genius behind the homing pigeon logo.
A special thank you to [Adrià Compte](https://dribbble.com/muniatu), the genius behind the homing pigeon logo.
3 changes: 2 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
homing-pigeon:
volumes:
- ./sockets:/tmp
- ./:/go/src/github.com/softonic/homing-pigeon
build:
context: .
dockerfile: Dockerfile
Expand Down Expand Up @@ -50,4 +51,4 @@ services:
ulimits:
memlock:
soft: -1
hard: -1
hard: -1
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
module github.com/softonic/homing-pigeon

require (
github.com/elastic/go-elasticsearch/v7 v7.4.1
github.com/fatih/color v1.7.0 // indirect
github.com/gobuffalo/envy v1.8.1 // indirect
github.com/elastic/go-elasticsearch/v7 v7.10.0
github.com/gobuffalo/envy v1.9.0 // indirect
github.com/gobuffalo/packd v1.0.0 // indirect
github.com/gobuffalo/packr v1.30.1 // indirect
github.com/golang/protobuf v1.3.2
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/rakyll/gotest v0.0.0-20191108192113-45d501058f2a // indirect
github.com/rogpeppe/go-internal v1.5.0 // indirect
github.com/golang/protobuf v1.4.3
github.com/golangci/golangci-lint v1.33.0 // indirect
github.com/rakyll/gotest v0.0.5 // indirect
github.com/rogpeppe/go-internal v1.6.2 // indirect
github.com/sarulabs/dingo v2.0.0+incompatible
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.4.0
github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/tools v0.0.0-20191212051200-825cb0626375 // indirect
google.golang.org/genproto v0.0.0-20191206224255-0243a4be9c8f // indirect
google.golang.org/grpc v1.25.1
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
github.com/streadway/amqp v1.0.0
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/vektra/mockery v1.1.2 // indirect
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/tools v0.0.0-20201121010211-780cb80bd7fb // indirect
google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 // indirect
google.golang.org/grpc v1.33.2
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
k8s.io/klog v1.0.0
)

Expand Down
Loading

0 comments on commit 07dad84

Please sign in to comment.