forked from raystack/raccoon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* goto package migrations * goto jave client package migrations * updated the go version * updated the buf version * go client package migration * package name updates * updating the naming * update the java client version
- Loading branch information
1 parent
e504267
commit 3da17d0
Showing
122 changed files
with
2,518 additions
and
665 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 |
---|---|---|
|
@@ -12,13 +12,11 @@ jobs: | |
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.14' | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
go-version: '1.17' | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Project | ||
run: make install-protoc; make setup | ||
run: make setup | ||
- name: Invoking go test | ||
run: make test | ||
- name: Invoking go bench test | ||
|
@@ -30,9 +28,7 @@ jobs: | |
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: '1.14' | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
go-version: '1.17' | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: make all |
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
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,17 +1,12 @@ | ||
FROM golang:1.14 | ||
FROM golang:1.17 | ||
|
||
WORKDIR /app | ||
RUN apt-get update && apt-get install unzip --no-install-recommends --assume-yes | ||
RUN PROTOC_ZIP=protoc-3.17.3-linux-x86_64.zip && \ | ||
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/$PROTOC_ZIP && \ | ||
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc && \ | ||
unzip -o $PROTOC_ZIP -d /usr/local 'include/*' && \ | ||
rm -f $PROTOC_ZIP | ||
COPY . . | ||
RUN make install-protoc && make generate-proto && make update-deps && make compile | ||
RUN make update-deps && make compile | ||
|
||
FROM debian:buster-slim | ||
FROM debian:bullseye | ||
WORKDIR /app | ||
COPY --from=0 /app/out/raccoon ./raccoon | ||
COPY --from=0 /app/raccoon ./raccoon | ||
COPY . . | ||
CMD ["./raccoon"] |
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,39 +1,24 @@ | ||
.PHONY: all | ||
|
||
ALL_PACKAGES=$(shell go list ./... | grep -v "vendor") | ||
APP_EXECUTABLE="out/raccoon" | ||
APP_EXECUTABLE="raccoon" | ||
COVER_FILE="/tmp/coverage.out" | ||
|
||
all: install-protoc setup compile | ||
all: setup compile | ||
|
||
# Setups | ||
setup: generate-proto copy-config | ||
setup: copy-config | ||
make update-deps | ||
|
||
install-protoc: | ||
@echo "> installing dependencies" | ||
go get -u github.com/golang/protobuf/[email protected] | ||
go get -u github.com/golang/protobuf/[email protected] | ||
go get -u google.golang.org/grpc/cmd/[email protected] | ||
|
||
update-deps: | ||
go mod tidy -v | ||
go mod vendor | ||
|
||
copy-config: | ||
cp .env.sample .env | ||
|
||
PROTO_PACKAGE=/proto | ||
generate-proto: | ||
rm -rf .temp | ||
mkdir -p .temp | ||
curl -o .temp/proton.tar.gz -L http://api.github.com/repos/odpf/proton/tarball/main; tar xvf .temp/proton.tar.gz -C .temp/ --strip-components 1 | ||
protoc --proto_path=.temp/ .temp/odpf/raccoon/v1beta1/raccoon.proto --go_out=./ --go_opt=paths=import --go_opt=Modpf/raccoon/v1beta1/raccoon.proto=$(PROTO_PACKAGE) | ||
protoc --proto_path=.temp/ .temp/odpf/raccoon/v1beta1/raccoon.proto --go-grpc_opt=paths=import --go-grpc_opt=Modpf/raccoon/v1beta1/raccoon.proto=$(PROTO_PACKAGE) --go-grpc_out=./ | ||
|
||
# Build Lifecycle | ||
compile: | ||
mkdir -p out/ | ||
go build -o $(APP_EXECUTABLE) | ||
|
||
build: copy-config update-deps compile | ||
|
@@ -44,9 +29,6 @@ install: | |
start: build | ||
./$(APP_EXECUTABLE) | ||
|
||
clean: ## Clean the builds | ||
rm -rf out/ | ||
|
||
# Utility | ||
|
||
fmt: | ||
|
@@ -71,7 +53,7 @@ test: lint | |
test-bench: # run benchmark tests | ||
@go test $(shell go list ./... | grep -v "vendor") -v -bench ./... -run=^Benchmark | ||
|
||
test_ci: install-protoc setup test | ||
test_ci: setup test | ||
|
||
# Docker Run | ||
|
||
|
@@ -83,4 +65,4 @@ docker-stop: | |
docker-compose stop | ||
|
||
docker-start: | ||
docker-compose start | ||
docker-compose start |
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
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
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,6 +1,6 @@ | ||
/* | ||
Package raccoon provides grpc, http and websocket client for the raccoon service. | ||
see https://github.com/odpf/raccoon | ||
see https://github.com/goto/raccoon | ||
*/ | ||
|
||
package raccoon |
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.