Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .github/.kodiak.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version = 1

[merge]
method = "squash" # default: "merge"
delete_branch_on_merge = true # default: false
optimistic_updates = true # default: true
prioritize_ready_to_merge = true # default: false

[merge.message]
title = "pull_request_title" # default: "github_default"
body = "github_default" # default: "github_default"
strip_html_comments = true # default: false

[update]
always = true # default: false

[approve]
auto_approve_usernames = ["1gtm", "tamalsaha"]
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
pull_request:
branches:
- "*"
push:
branches:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install link checker
run: |
curl -fsSL -o liche https://github.com/appscodelabs/liche/releases/download/v0.1.0/liche-linux-amd64
chmod +x liche
sudo mv liche /usr/local/bin/liche

- name: Install codespan schema checker
run: |
curl -fsSL -o codespan-schema-checker https://github.com/kmodules/codespan-schema-checker/releases/download/v0.0.1/codespan-schema-checker-linux-amd64
chmod +x codespan-schema-checker
sudo mv codespan-schema-checker /usr/local/bin/codespan-schema-checker

- name: Check links
run: |
liche -r docs -d $(pwd) -c 10 -p -h -l -x '^(.*/docs/{{<.*>}}/.*|.*github.com.*|.*api.slack.com.*|.*askapache.com.*|.*twitter.com.*|.*dev.mysql.com.*|.*linux.die.net.*)$'

- name: Create Kubernetes cluster
id: kind
uses: engineerd/setup-kind@v0.5.0
with:
version: v0.29.0

- name: Check codespan schema
run: |
git clone https://github.com/kmodules/resource-metadata.git
mv resource-metadata/hub /tmp
rm -rf resource-metadata
codespan-schema-checker --content=./docs
89 changes: 89 additions & 0 deletions .github/workflows/preview-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: preview-website

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.25'
id: go

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.0.0'

- name: Install yq
run: |
curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
chmod +x yqq
sudo mv yqq /usr/local/bin/yqq
pipx install yq

- name: Install Hugo
run: |
curl -fsSL -o hugo_extended.deb https://github.com/gohugoio/hugo/releases/download/v0.111.1/hugo_extended_0.111.1_linux-amd64.deb
sudo dpkg -i hugo_extended.deb
rm hugo_extended.deb

- name: Install Hugo Tools
run: |
curl -fsSL -o hugo-tools https://github.com/appscodelabs/hugo-tools/releases/download/v0.2.23/hugo-tools-linux-amd64
chmod +x hugo-tools
sudo mv hugo-tools /usr/local/bin/hugo-tools

# - name: Clone website repository
# env:
# GITHUB_USER: 1gtm
# GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
# WEBSITE_REPOSITORY: ${{ secrets.WEBSITE_REPOSITORY }}
# run: |
# url="https://${GITHUB_USER}:${GITHUB_TOKEN}@${WEBSITE_REPOSITORY}.git"
# cd $RUNNER_WORKSPACE
# git clone --recurse-submodules $url
# cd $(basename $WEBSITE_REPOSITORY)
# git config user.name "${GITHUB_USER}"
# git config user.email "${GITHUB_USER}@appscode.com"

- name: Update docs
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
WEBSITE_REPOSITORY: ${{ secrets.WEBSITE_REPOSITORY }}
run: |
set -x
# export WEBSITE_ROOT=$RUNNER_WORKSPACE/$(basename $WEBSITE_REPOSITORY)
# cd $WEBSITE_ROOT
npm install
make assets
hugo-tools update-branch --filename=./data/products/kubeobj-docs.json --branch=${{ github.event.pull_request.head.sha }}
make docs-skip-assets
make gen-prod

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_QA }}'
projectId: kubedb-new-e7965
# target: kubedb-new-e7965
entryPoint: '../website'
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
41 changes: 41 additions & 0 deletions .github/workflows/release-tracker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release-tracker

on:
pull_request:
types: [closed]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- name: Prepare git
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
git config --global user.name "${GITHUB_USER}"
git config --global user.email "${GITHUB_USER}@appscode.com"
git remote set-url origin https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git

- name: Install GitHub CLI
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
sudo mv bin/hub /usr/local/bin

- name: Update release tracker
if: |
github.event.action == 'closed' &&
github.event.pull_request.merged == true
env:
GITHUB_USER: 1gtm
GITHUB_TOKEN: ${{ secrets.LGTM_GITHUB_TOKEN }}
run: |
./hack/scripts/update-release-tracker.sh
34 changes: 33 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
.idea
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

_testmain.go

*.exe
*.test
*.prof
/.idea
/dist
**/junit.xml
**/.env
/.vscode
/coverage.txt

/bin
/.go
36 changes: 36 additions & 0 deletions DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Empty file added LICENSE
Empty file.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

17 changes: 17 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Welcome | KubeObj
description: Welcome to KubeObj
menu:
docs:
identifier: readme-kubeobj
name: Readme
parent: welcome
weight: -1
product_name: kubeobj
menu_name: docs
section_menu_id: welcome
url: /docs/welcome/
aliases:
- /docs/
- /docs/README/
---
10 changes: 10 additions & 0 deletions docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Docs | KubeObj
description: KubeObj Docs
menu:
docs_{{ .version }}:
identifier: welcome
name: Welcome
weight: 10
menu_name: docs
---
42 changes: 42 additions & 0 deletions hack/scripts/open-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Copyright AppsCode Inc. and Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -eou pipefail

SCRIPT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/../..)
SCRIPT_NAME=$(basename "${BASH_SOURCE[0]}")
pushd $SCRIPT_ROOT

# http://redsymbol.net/articles/bash-exit-traps/
function cleanup() {
popd
}
trap cleanup EXIT

git add --all
if git diff -s --exit-code HEAD; then
echo "Docs are already up-to-date!"
exit 0
fi

pr_branch=${GITHUB_REPOSITORY}@${GITHUB_SHA:0:8}
git checkout -b $pr_branch
git commit -a -s -m "Update docs for $pr_branch"
git push -u origin HEAD
hub pull-request \
--labels automerge \
--message "Update docs for $pr_branch" \
--message "$(git show -s --format=%b)"
Loading