Skip to content

Commit

Permalink
feat: add the initial implementation (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
cre8ivejp authored Sep 28, 2022
1 parent 10f8de7 commit 038601c
Show file tree
Hide file tree
Showing 1,712 changed files with 251,614 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Taken from Kubernetes

# Show us information about failures.
build --verbose_failures
test --test_output=errors

# Make /tmp hermetic.
build --sandbox_tmpfs_path=/tmp

# Ensure that Bazel never runs as root, which can cause unit tests to fail.
# This flag requires Bazel 0.5.0+
build --sandbox_fake_username

# Enable go race detection.
test --features=race

# Prevent TS worker from trying to expand the `includes` section in tsconfig.json.
# It would find the "test/*.ts" reference when compiling //src:src, and the FileCache will then error
# when TS attempts to read one of these files that doesn't belong in the compilation.
build --worker_sandboxing
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.1
38 changes: 38 additions & 0 deletions .github/workflows/pr-title-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "pr-title-validation"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
validate_pr_title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
with:
# Use the following release types to match the same rules in the PR title lint
# https://github.com/googleapis/release-please/blob/main/src/changelog-notes.ts#L42-L55
types: |
feat
fix
perf
deps
revert
docs
style
chore
refactor
test
build
ci
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62 changes: 62 additions & 0 deletions .github/workflows/publish_chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: publish-chart

on:
workflow_dispatch:
inputs:
bucketeer_version:
description: "Bucketeer version"
required: false
push:
branches:
- main
tags:
- "v*"
paths:
- "!**/**.md"
- "CHANGELOG.md" # DO NOT remove this line. Otherwise, the publish chart won't start.

env:
REGISTRY: ghcr.io
HELM_VERSION: 3.8.2

jobs:
artifacts:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
checks: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# This is a workaround to ensure the publish_chart won't start before the release workflow.
# Because the version is based on the tag, if the publish_chart starts before
# the release workflow, it will create a chart with an old version.
- name: Wait for release note to succeed
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
# DO NOT CHANGE the check-name. This name is based on the workflow name defined in the release.yaml
check-name: "Release Please"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Determine version
run: |
if [ ! -z ${{ github.event.inputs.bucketeer_version }} ]; then
echo "BUCKETEER_VERSION=${{ github.event.inputs.bucketeer_version }}" >> $GITHUB_ENV
else
echo "BUCKETEER_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_ENV
fi
- name: Install helm
uses: Azure/setup-helm@v1
with:
version: ${{ env.HELM_VERSION }}
- name: Login to OCI using Helm
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ${{ env.REGISTRY }} --username ${{ github.repository_owner }} --password-stdin
- name: Publish helm chart
run: |
make build-chart VERSION=${{ env.BUCKETEER_VERSION }}
helm push .artifacts/bucketeer-${{ env.BUCKETEER_VERSION }}.tgz oci://${{ env.REGISTRY }}/bucketeer-io/chart
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release

on:
workflow_dispatch:
push:
branches:
- main

jobs:
release_please:
name: Release Please
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/[email protected]
with:
changelog-types: |
[
{"type":"build","section":"Build System","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false},
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"perf","section":"Performance Improvements","hidden":false},
{"type":"revert","section":"Reverts","hidden":false}
]
release-type: simple
package-name: release-please-action
bump-minor-pre-major: true
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.artifacts
/build
/bazel-bin
/bazel-bucketeer
/bazel-genfiles
/bazel-out
/bazel-proto
/bazel-testlogs
.DS_Store
/vendor
/proto/**/*.pb.go
/proto/**/*.py
/proto/swift_output
node_modules
telepresence.log
venv
*.swp
25 changes: 25 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
run:
tests: false
linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/bucketeer-io/bucketeer
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
# Since we got the following error, staticcheck is disabled. After solving it, we'll enable it.
# pkg/account/apikeycacher/apikeycacher.go:284:12: SA1019: ptypes.UnmarshalAny is deprecated: Call the any.UnmarshalTo method instead. (staticcheck)
# - staticcheck
- structcheck
- typecheck
- unused
- varcheck
- gofmt
- goimports
- lll
11 changes: 11 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:exclude vendor
# gazelle:exclude proto/external
# gazelle:go_naming_convention go_default_library

gazelle(
name = "gazelle",
command = "fix",
prefix = "github.com/bucketeer-io/bucketeer",
)
21 changes: 21 additions & 0 deletions BUILD.googleapis
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
name = "api_proto",
srcs = [
"google/api/http.proto",
"google/api/annotations.proto",
],
deps = ["@com_google_protobuf//:descriptor_proto"],
)

go_proto_library(
name = "api_go_proto",
importpath = "google/api",
proto = ":api_proto",
deps = [
"@com_github_golang_protobuf//protoc-gen-go/descriptor:go_default_library",
],
)
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

## [0.1.0](https://github.com/bucketeer-io/bucketeer/compare/v0.0.0...v0.1.0) (2022-09-25)


### Features

* add initial implementation ([#1](https://github.com/bucketeer-io/bucketeer/issues/1)) ([2ddbb2c](https://github.com/bucketeer-io/bucketeer/commit/2ddbb2c455a99cbce30a6e6da0b3859fdcc4b919))

## [0.1.1](https://github.com/bucketeer-io/bucketeer/compare/v0.1.0...v0.1.1) (2022-09-25)


### Bug Fixes

* publish chart workflow not triggering ([5f73004](https://github.com/bucketeer-io/bucketeer/commit/5f7300484cb20ac5084960185a18b4ffe7160e1f))

## [0.1.0](https://github.com/bucketeer-io/bucketeer/compare/v0.0.0...v0.1.0) (2022-09-25)


### Features

* add initial implementation ([#1](https://github.com/bucketeer-io/bucketeer/issues/1)) ([47bdcec](https://github.com/bucketeer-io/bucketeer/commit/47bdcec22d4237fcc2b16b42198b9f1290e48ad0))
26 changes: 26 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Bucketeer Project - Individual Contributor License Agreement

Thank you for your interest in Bucketeer Project. In order to clarify the intellectual property license granted with Contributions from any person or entity, the Project must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Project and its users; it does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Project. In return, the Project shall not use Your Contributions in a way that is contrary to the public benefit. Except for the license granted herein to the Project and recipients of software distributed by the Project, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the Project. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Project for inclusion in, or documentation of, any of the products owned or managed by the Project (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Project or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to the Project and to recipients of software distributed by the Project a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to the Project and to recipients of software distributed by the Project a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Project, or that your employer has executed a separate Corporate CLA with the Project.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may submit it to the Project separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".

8. You agree to notify the Project of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.

7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing to Bucketeer

We would ❤️ for you to contribute to Bucketeer and help make it better! Anyone can use, improve, and enjoy it!

## Become a contributor

Please follow our contribution guide [here](https://docs.bucketeer.io/contribution-guide).
3 changes: 3 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Deployment

The deployment documentation is still in a work-in-progress state. We will update it soon. Stay tuned!
Loading

0 comments on commit 038601c

Please sign in to comment.