Skip to content

Commit ce2c948

Browse files
edigaryevfkorotkov
andauthored
Use Buf Schema Registry (#731)
* Use Buf Schema Registry * Update Buf credentials Co-authored-by: Fedor Korotkov <[email protected]> * Update Buf credentials Co-authored-by: Fedor Korotkov <[email protected]> * Work around golangci/golangci-lint#4698 --------- Co-authored-by: Fedor Korotkov <[email protected]>
1 parent 13053d0 commit ce2c948

9 files changed

+2945
-2038
lines changed

.cirrus.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,40 @@ docker_builder:
160160
--tag ghcr.io/cirruslabs/cirrus-cli:$CIRRUS_TAG \
161161
--tag ghcr.io/cirruslabs/cirrus-cli:latest \
162162
.
163+
164+
task:
165+
name: Check for lacking "buf generate" invocation
166+
167+
container:
168+
image: bufbuild/buf
169+
170+
generate_script: buf generate
171+
check_script: git diff --exit-code
172+
173+
task:
174+
only_if: $CIRRUS_TAG != ''
175+
name: buf push (tagged)
176+
177+
container:
178+
image: bufbuild/buf
179+
180+
login_script: echo $BUF_TOKEN | buf registry login --username $BUF_LOGIN --token-stdin
181+
push_script: buf push --tag $CIRRUS_TAG
182+
183+
env:
184+
BUF_LOGIN: fkorotkov
185+
BUF_TOKEN: ENCRYPTED[!8ee7eb2504cc84b08d4a7c0dacbe103640b1feaa26d06f0df010784e872d39e65a0cdea3fc7c09b065a917a77113b96b!]
186+
187+
task:
188+
only_if: $CIRRUS_BRANCH != ''
189+
name: buf push (branch)
190+
191+
container:
192+
image: bufbuild/buf
193+
194+
login_script: echo $BUF_TOKEN | buf registry login --username $BUF_LOGIN --token-stdin
195+
push_script: buf push --branch $CIRRUS_BRANCH
196+
197+
env:
198+
BUF_LOGIN: fkorotkov
199+
BUF_TOKEN: ENCRYPTED[!8ee7eb2504cc84b08d4a7c0dacbe103640b1feaa26d06f0df010784e872d39e65a0cdea3fc7c09b065a917a77113b96b!]

.golangci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ linters:
1616
- errcheck
1717
- exhaustive
1818
- exportloopref
19-
- gochecknoinits
2019
- gocognit
2120
- gocritic
2221
- gocyclo
@@ -119,6 +118,9 @@ linters:
119118
# It's OK to have dynamic errors as this is mostly a CLI
120119
- goerr113
121120

121+
# Work around https://github.com/golangci/golangci-lint/pull/4698
122+
- gochecknoinits
123+
122124
issues:
123125
# Don't hide multiple issues that belong to one class since GitHub annotations can handle them all nicely.
124126
max-issues-per-linter: 0

0 commit comments

Comments
 (0)