Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anjmao/vcheck
GRPC/HTTP deployment build version check
https://github.com/anjmao/vcheck
Last synced: 12 days ago
JSON representation
GRPC/HTTP deployment build version check
- Host: GitHub
- URL: https://github.com/anjmao/vcheck
- Owner: anjmao
- License: mit
- Created: 2019-04-03T13:37:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-14T12:54:00.000Z (over 5 years ago)
- Last Synced: 2024-06-20T10:07:20.439Z (5 months ago)
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vcheck
[![](https://img.shields.io/docker/pulls/anjmao/vcheck.svg)](https://hub.docker.com/r/anjmao/vcheck)Check your deployed GRPC, HTTP service version to verify if deployment was successful. This is especially well suited for travis, gitlab CI/CD deployments.
## GRPC service example
GRPC service should implement endpoint which can return buildVersion number.
```proto
syntax = "proto3";
package version;service Version {
rpc GetVersion (GetVersionRequest) returns (GetVersionReply) {}
}message GetVersionRequest {}
message GetVersionReply {
string buildVersion = 1;
}
``````bash
MY_CI_BUILD_NUMBER=8326
vcheck \
--target=staging.my.grpcapi.net:443 \
--method=/version.Version/GetVersion \
--client=grpc \
--expect=${MY_CI_BUILD_NUMBER} \
--count=12 \
--sleep=5
```## HTTP service example
HTTP service should implement GET endpoint returning JSON with buildVersion field.
```bash
MY_CI_BUILD_NUMBER=8326
vcheck \
--target=http://staging.my.grpcapi.net \
--method=api/version \
--client=http \
--expect=${MY_CI_BUILD_NUMBER} \
--count=12 \
--sleep=5
```### Docker
vheck util is also available as a docker image
```bash
docker run --rm anjmao:vcheck --help
```### Release
Before release install gox and github-release tools
```bash
go GO111MODULE=off go get github.com/mitchellh/gox
go GO111MODULE=off go get github.com/c4milo/github-release
``````bash
make release
```