Skip to content

Commit

Permalink
Use Buf Schema Registry (#731)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
edigaryev and fkorotkov authored May 8, 2024
1 parent 13053d0 commit ce2c948
Show file tree
Hide file tree
Showing 9 changed files with 2,945 additions and 2,038 deletions.
37 changes: 37 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,40 @@ docker_builder:
--tag ghcr.io/cirruslabs/cirrus-cli:$CIRRUS_TAG \
--tag ghcr.io/cirruslabs/cirrus-cli:latest \
.
task:
name: Check for lacking "buf generate" invocation

container:
image: bufbuild/buf

generate_script: buf generate
check_script: git diff --exit-code

task:
only_if: $CIRRUS_TAG != ''
name: buf push (tagged)

container:
image: bufbuild/buf

login_script: echo $BUF_TOKEN | buf registry login --username $BUF_LOGIN --token-stdin
push_script: buf push --tag $CIRRUS_TAG

env:
BUF_LOGIN: fkorotkov
BUF_TOKEN: ENCRYPTED[!8ee7eb2504cc84b08d4a7c0dacbe103640b1feaa26d06f0df010784e872d39e65a0cdea3fc7c09b065a917a77113b96b!]

task:
only_if: $CIRRUS_BRANCH != ''
name: buf push (branch)

container:
image: bufbuild/buf

login_script: echo $BUF_TOKEN | buf registry login --username $BUF_LOGIN --token-stdin
push_script: buf push --branch $CIRRUS_BRANCH

env:
BUF_LOGIN: fkorotkov
BUF_TOKEN: ENCRYPTED[!8ee7eb2504cc84b08d4a7c0dacbe103640b1feaa26d06f0df010784e872d39e65a0cdea3fc7c09b065a917a77113b96b!]
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ linters:
- errcheck
- exhaustive
- exportloopref
- gochecknoinits
- gocognit
- gocritic
- gocyclo
Expand Down Expand Up @@ -119,6 +118,9 @@ linters:
# It's OK to have dynamic errors as this is mostly a CLI
- goerr113

# Work around https://github.com/golangci/golangci-lint/pull/4698
- gochecknoinits

issues:
# Don't hide multiple issues that belong to one class since GitHub annotations can handle them all nicely.
max-issues-per-linter: 0
Expand Down
Loading

0 comments on commit ce2c948

Please sign in to comment.