-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update README.md and add gh workflows
- Loading branch information
Showing
6 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- | ||
ADDON DEVELOPERS: If you are submitting a new addon | ||
- Make sure you read the Addon Naming Guide: | ||
- Verify you can install your addon locally: kbcli builder addon validate <ADDON_MANIFEST> | ||
`kbcli` PLUGIN DEVELOPERS: If you are submitting a new `kbcli` plugin | ||
- Make sure you read the CLIPlugin Naming Guide: | ||
- Verify you can install your addon locally: kbcli builder plugin validate <ADDON_MANIFEST> | ||
`krew` compatible PLUGIN DEVELOPERS: If you are submitting a new `krew` compatible plugin | ||
- Make sure you read the Plugin Naming Guide: | ||
- Verify you can install your addon locally: kubectl krew install --manifest=[...] --archive=[...] | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: block-index CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Validate krew plugin manifests | ||
runs-on: ubuntu-latest | ||
env: | ||
KREW_VERSION: v0.4.3 | ||
GO111MODULE: on | ||
steps: | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.20' | ||
id: go | ||
|
||
- name: Go module cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ env.KREW_VERSION }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Check out PR branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # disable shallow clones | ||
|
||
- name: Fetch base branch | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
git fetch --no-tags --prune --depth=1 origin +refs/heads/${GITHUB_BASE_REF}:refs/remotes/origin/${GITHUB_BASE_REF} | ||
- name: Install kubectl | ||
run: | | ||
set -euo pipefail | ||
sudo curl -fsSL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.26.3/bin/linux/amd64/kubectl | ||
sudo chmod +x /usr/bin/kubectl | ||
- name: Install krew | ||
run: | | ||
set -euo pipefail | ||
cd "$(mktemp -d)" | ||
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/${KREW_VERSION}/krew.yaml" | ||
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/${KREW_VERSION}/krew-linux_amd64.tar.gz" | ||
tar zxvf krew-linux_amd64.tar.gz | ||
./krew-linux_amd64 install --manifest=krew.yaml --archive=krew-linux_amd64.tar.gz | ||
- name: Install validate-krew-manifest plugin | ||
run : | | ||
set -euo pipefail | ||
export GOBIN=$HOME/bin | ||
go get sigs.k8s.io/krew/cmd/validate-krew-manifest@${KREW_VERSION} | ||
- name: Validate updated krew plugin manifests | ||
if: github.event_name == 'pull_request' | ||
run : | | ||
set -x | ||
set -euo pipefail | ||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" | ||
git diff --name-only --diff-filter=AM origin/${GITHUB_BASE_REF} ${{ github.sha }} -- plugins/ | | ||
tee /dev/stderr | | ||
xargs -I _ $HOME/bin/validate-krew-manifest -manifest _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# block-index | ||
KubeBlocks extensions "Blocks" registry index repository | ||
This is KubeBlocks' Addon and Plugin extensions index repository. It is meant to be useful only for extensions developers. | ||
|
||
## Submitting new extensions | ||
|
||
To learn how to create an `Addon` or `Plugin` extension and submit it to `block-index`, read the [Developer Guide][dev-guide] | ||
and make a pull request to this repository. | ||
|
||
|
||
## The `block-index` file and directory structure | ||
|
||
```bash | ||
addons/ # A directory containing `addons.extensions.kubeblocks.io` manifests. | ||
plugins/ # A directory containing `cliplugins.extensions.kubeblocks.io` manifests. | ||
krew-plugins/ # A directory containing `plugins.krew.googlecontainertools.github.com` manifests. | ||
``` |
Empty file.
Empty file.
Empty file.