Skip to content

Commit

Permalink
Add note to README on responsible CI usage.
Browse files Browse the repository at this point in the history
This is in the hopes of easing folks hitting golang#763 in getting
to a proper use of CI.

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
  • Loading branch information
edwarnicke committed Nov 28, 2018
1 parent 8d0c54c commit eb11628
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,23 @@ breaking change and would be subject to the announcement policy stated above.
The `protoc-gen-go/generator` package exposes a plugin interface,
which is used by the gRPC code generation. This interface is not
supported and is subject to incompatible changes without notice.

## Using protoc-gen-go in Continuous Integration (CI) Systems

CI systems should produce repeatable builds. Installing proto-gen-go via:

```bash
go get go get github.com/golang/protobuf/protoc-gen-go
```

within a CI system produces inherently non-reproducible builds, because
```go get``` always pulls from the HEAD of master, which is always a moving target.

This can lead to unexpected build breakage in the CI system.

If you are using vendoring in go, and wish to have a repeatable stable build process,
it is better to install protoc-ge-go in your CI via:

```bash
go install ./vendor/github.com/golang/protobuf/protoc-gen-go/
```

0 comments on commit eb11628

Please sign in to comment.