mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
doc: add github action
Signed-off-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
parent
85dbdbd11f
commit
6a821da6e6
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 30
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 14
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- frozen
|
||||||
|
staleLabel: stale
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Any further update will
|
||||||
|
cause the issue/pull request to no longer be considered stale. Thank you for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: >
|
||||||
|
This issue is being automatically closed due to inactivity.
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
name: Bug Report
|
||||||
|
description: File a bug report
|
||||||
|
labels: [bug]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
id: preface
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
- type: markdown
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
value: "## Environment"
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
attributes:
|
||||||
|
label: What is version of KubeKey has the issue?
|
||||||
|
description: "You can use the command to get `./kk version`"
|
||||||
|
- type: input
|
||||||
|
id: os
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
attributes:
|
||||||
|
label: What is your os environment?
|
||||||
|
description: "e.g. Ubuntu 16.04"
|
||||||
|
- type: textarea
|
||||||
|
id: config
|
||||||
|
attributes:
|
||||||
|
label: KubeKey config file
|
||||||
|
description: "If applicable, add the KubeKey config file content to help explain your problem."
|
||||||
|
render: yaml
|
||||||
|
- type: markdown
|
||||||
|
id: main
|
||||||
|
attributes:
|
||||||
|
value: "## Main"
|
||||||
|
- type: textarea
|
||||||
|
id: what
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
attributes:
|
||||||
|
label: A clear and concise description of what happend.
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: "Relevant log output"
|
||||||
|
description: "Please copy and paste any relevant log output."
|
||||||
|
render: shell
|
||||||
|
- type: textarea
|
||||||
|
id: additional-information
|
||||||
|
attributes:
|
||||||
|
label: "Additional information"
|
||||||
|
description: "Add any other context about the information here (screenshots, video, etc.)."
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Any other questions about KubeKey
|
||||||
|
url: https://kubesphere.slack.com/
|
||||||
|
about: If you have any other questions, you can join our slack channel.
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: Feature Request
|
||||||
|
description: File a feature request
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
id: preface
|
||||||
|
attributes:
|
||||||
|
value: "Thank you for submitting new features for KubeKey."
|
||||||
|
- type: markdown
|
||||||
|
id: environment
|
||||||
|
attributes:
|
||||||
|
value: "## Environment"
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: "Your current KubeKey version"
|
||||||
|
description: "You can use the command to get `./kk version`"
|
||||||
|
- type: markdown
|
||||||
|
id: main
|
||||||
|
attributes:
|
||||||
|
value: "## Main"
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: "Describe this feature"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: solution
|
||||||
|
attributes:
|
||||||
|
label: "Describe the solution you'd like"
|
||||||
|
description: "You can have a concise description of any alternative solutions or ideas you've considered."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: additional-information
|
||||||
|
attributes:
|
||||||
|
label: "Additional information"
|
||||||
|
description: "Add any other context about the information here (screenshots, video, etc.)."
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
approvers:
|
||||||
|
- pixiake
|
||||||
|
- rayzhou2017
|
||||||
|
- LinuxSuRen
|
||||||
|
- ImitationImmortal
|
||||||
|
|
||||||
|
reviewers:
|
||||||
|
- pixiake
|
||||||
|
- rayzhou2017
|
||||||
|
- zryfish
|
||||||
|
- benjaminhuo
|
||||||
|
- calvinyv
|
||||||
|
- FeynmanZhou
|
||||||
|
- huanggze
|
||||||
|
- wansir
|
||||||
|
- LinuxSuRen
|
||||||
|
- ImitationImmortal
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
<!-- Thanks for sending a pull request! Here are some tips for you:
|
||||||
|
|
||||||
|
1. If you want **faster** PR reviews, read how: https://github.com/kubesphere/community/blob/master/developer-guide/development/the-pr-author-guide-to-getting-through-code-review.md
|
||||||
|
2. In case you want to know how your PR got reviewed, read: https://github.com/kubesphere/community/blob/master/developer-guide/development/code-review-guide.md
|
||||||
|
3. Here are some coding conventions followed by KubeSphere community: https://github.com/kubesphere/community/blob/master/developer-guide/development/coding-conventions.md
|
||||||
|
-->
|
||||||
|
|
||||||
|
### What type of PR is this?
|
||||||
|
<!--
|
||||||
|
Add one of the following kinds:
|
||||||
|
/kind bug
|
||||||
|
/kind cleanup
|
||||||
|
/kind documentation
|
||||||
|
/kind feature
|
||||||
|
/kind design
|
||||||
|
/kind dependencies
|
||||||
|
/kind test
|
||||||
|
|
||||||
|
Optionally add one or more of the following kinds if applicable:
|
||||||
|
/kind api-change
|
||||||
|
/kind deprecation
|
||||||
|
/kind failing-test
|
||||||
|
/kind flake
|
||||||
|
/kind regression
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
### What this PR does / why we need it:
|
||||||
|
|
||||||
|
### Which issue(s) this PR fixes:
|
||||||
|
<!--
|
||||||
|
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
|
||||||
|
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
|
||||||
|
-->
|
||||||
|
Fixes #
|
||||||
|
|
||||||
|
### Special notes for reviewers:
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
### Does this PR introduced a user-facing change?
|
||||||
|
<!--
|
||||||
|
If no, just write "None" in the release-note block below.
|
||||||
|
If yes, a release note is required:
|
||||||
|
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
|
||||||
|
|
||||||
|
For more information on release notes see: https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md
|
||||||
|
-->
|
||||||
|
```release-note
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Additional documentation, usage docs, etc.:
|
||||||
|
<!--
|
||||||
|
This section can be blank if this pull request does not require a release note.
|
||||||
|
Please use the following format for linking documentation or pass the
|
||||||
|
section below:
|
||||||
|
- [KEP]: <link>
|
||||||
|
- [Usage]: <link>
|
||||||
|
- [Other doc]: <link>
|
||||||
|
-->
|
||||||
|
```docs
|
||||||
|
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
pull-request-branch-name:
|
||||||
|
separator: "-"
|
||||||
|
- package-ecosystem: "gomod"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
pull-request-branch-name:
|
||||||
|
separator: "-"
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
|
||||||
|
name-template: 'v$NEXT_PATCH_VERSION 🌈'
|
||||||
|
tag-template: 'v$NEXT_PATCH_VERSION'
|
||||||
|
version-template: $MAJOR.$MINOR.$PATCH
|
||||||
|
# Emoji reference: https://gitmoji.carloscuesta.me/
|
||||||
|
categories:
|
||||||
|
- title: '🚀 Features'
|
||||||
|
labels:
|
||||||
|
- 'feature'
|
||||||
|
- 'enhancement'
|
||||||
|
- 'kind/feature'
|
||||||
|
- title: '🐛 Bug Fixes'
|
||||||
|
labels:
|
||||||
|
- 'fix'
|
||||||
|
- 'bugfix'
|
||||||
|
- 'bug'
|
||||||
|
- 'regression'
|
||||||
|
- 'kind/bug'
|
||||||
|
- title: 📝 Documentation updates
|
||||||
|
labels:
|
||||||
|
- 'documentation'
|
||||||
|
- 'kind/documentation'
|
||||||
|
- title: 👻 Maintenance
|
||||||
|
labels:
|
||||||
|
- chore
|
||||||
|
- dependencies
|
||||||
|
- 'kind/cleanup'
|
||||||
|
- title: 🚦 Tests
|
||||||
|
labels:
|
||||||
|
- test
|
||||||
|
- tests
|
||||||
|
exclude-labels:
|
||||||
|
- reverted
|
||||||
|
- no-changelog
|
||||||
|
- skip-changelog
|
||||||
|
- invalid
|
||||||
|
change-template: '* $TITLE (#$NUMBER) @$AUTHOR'
|
||||||
|
template: |
|
||||||
|
## What’s Changed
|
||||||
|
|
||||||
|
$CHANGES
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
repository:
|
||||||
|
name: kubekey
|
||||||
|
description: "KubeKey provides a flexible, rapid and convenient way to install Kubernetes only, both Kubernetes and KubeSphere, and related cloud-native add-ons. It is also an efficient tool to scale and upgrade your cluster."
|
||||||
|
homepage: https://kubesphere.io/
|
||||||
|
private: false
|
||||||
|
has_issues: true
|
||||||
|
has_wiki: false
|
||||||
|
has_downloads: false
|
||||||
|
default_branch: master
|
||||||
|
allow_squash_merge: true
|
||||||
|
allow_merge_commit: true
|
||||||
|
allow_rebase_merge: true
|
||||||
|
labels:
|
||||||
|
- name: newbie
|
||||||
|
color: abe7f4
|
||||||
|
description: These're friendly issues for new comers
|
||||||
|
- name: bug
|
||||||
|
color: d73a4a
|
||||||
|
description: Something isn't working
|
||||||
|
- name: feature
|
||||||
|
color: ffc6a3
|
||||||
|
- name: enhancement
|
||||||
|
color: a2eeef
|
||||||
|
description: New feature or request
|
||||||
|
- name: help wanted
|
||||||
|
color: 008672
|
||||||
|
description: Extra attention is needed
|
||||||
|
- name: bugfix
|
||||||
|
color: 0412d6
|
||||||
|
- name: regression
|
||||||
|
color: c5def5
|
||||||
|
- name: documentation
|
||||||
|
color: 5ce05e
|
||||||
|
- name: Hacktoberfest
|
||||||
|
description: More details from https://hacktoberfest.digitalocean.com/
|
||||||
|
color: 5ce05e
|
||||||
|
- name: test
|
||||||
|
color: c2c2fc
|
||||||
|
- name: chore
|
||||||
|
color: c2c2fc
|
||||||
|
- name: dependencies
|
||||||
|
color: 0366d6
|
||||||
|
description: Pull requests that update a dependency file
|
||||||
|
- name: no-changelog
|
||||||
|
color: c2c2fc
|
||||||
|
- name: priority-high
|
||||||
|
color: D93F0B
|
||||||
|
- name: priority-medium
|
||||||
|
color: FBCA04
|
||||||
|
- name: priority-low
|
||||||
|
color: 006B75
|
||||||
|
branches:
|
||||||
|
- name: master
|
||||||
|
protection:
|
||||||
|
required_pull_request_reviews:
|
||||||
|
required_approving_review_count: 1
|
||||||
|
dismiss_stale_reviews: true
|
||||||
|
require_code_owner_reviews: true
|
||||||
|
dismissal_restrictions:
|
||||||
|
users: []
|
||||||
|
teams: []
|
||||||
|
required_status_checks:
|
||||||
|
strict: true
|
||||||
|
contexts: []
|
||||||
|
enforce_admins: false
|
||||||
|
restrictions:
|
||||||
|
users: []
|
||||||
|
teams: []
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
name: BuildContainerImage
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v4*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'kubesphere/kubekey'
|
||||||
|
env:
|
||||||
|
GO111MODULE: on
|
||||||
|
steps:
|
||||||
|
- name: Prepare
|
||||||
|
id: prepare
|
||||||
|
run: |
|
||||||
|
VERSION=latest
|
||||||
|
|
||||||
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
|
fi
|
||||||
|
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Login to Aliyun
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: registry.cn-beijing.aliyuncs.com
|
||||||
|
username: ${{ secrets.ALIYUNCS_USERNAME }}
|
||||||
|
password: ${{ secrets.ALIYUNCS_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Login to Hub_Kubesphere
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: hub.kubesphere.com.cn
|
||||||
|
username: ${{ secrets.HUB_KUBESPHERE_USERNAME }}
|
||||||
|
password: ${{ secrets.HUB_KUBESPHERE_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Login to DOCKER
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
platforms: all
|
||||||
|
|
||||||
|
- name: Set up Docker buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
|
||||||
|
- name: Build and push Docker images
|
||||||
|
run: |
|
||||||
|
tag=${{ steps.prepare.outputs.version }}
|
||||||
|
if [[ $tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
REGISTRY=docker.io/kubesphere TAG=$tag make docker-build
|
||||||
|
else
|
||||||
|
REGISTRY=docker.io/kubespheredev TAG=$tag make docker-build
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
name: goreleaser
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v4*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'kubesphere/kubekey'
|
||||||
|
steps:
|
||||||
|
- name: Prepare
|
||||||
|
id: prepare
|
||||||
|
run: |
|
||||||
|
LDFLAGS=$(shell hack/version.sh)
|
||||||
|
|
||||||
|
echo "ldflags=${LDFLAGS}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: 1.21
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v4
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: ${{ env.GITHUB_REF_NAME }}
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
LDFLAGS: ${{ steps.prepare.outputs.ldflags }}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
env:
|
||||||
|
- GO111MODULE=on
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- main: ./cmd/kk/kubekey.go
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
binary: kubekey
|
||||||
|
ldflags: "{{ .Env.LDFLAGS }}"
|
||||||
|
flags:
|
||||||
|
- builtin
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||||
|
files:
|
||||||
|
- none*
|
||||||
|
|
||||||
|
|
||||||
|
release:
|
||||||
|
prerelease: auto
|
||||||
|
|
||||||
|
universal_binaries:
|
||||||
|
- replace: true
|
||||||
5
Makefile
5
Makefile
|
|
@ -89,10 +89,11 @@ DOCKERCMD ?= $(shell which docker)
|
||||||
DOCKER_BUILD_ENV = DOCKER_BUILDKIT=1
|
DOCKER_BUILD_ENV = DOCKER_BUILDKIT=1
|
||||||
DOCKER_BUILD ?= $(DOCKER_BUILD_ENV) $(DOCKERCMD) buildx build
|
DOCKER_BUILD ?= $(DOCKER_BUILD_ENV) $(DOCKERCMD) buildx build
|
||||||
PLATFORM ?= linux/amd64,linux/arm64
|
PLATFORM ?= linux/amd64,linux/arm64
|
||||||
DOCKER_PUSH ?= $(DOCKER_BUILD) --platform $(PLATFORM) --push
|
DOCKER_OUT_TYPE ?= --push
|
||||||
|
DOCKER_PUSH ?= $(DOCKER_BUILD) --platform $(PLATFORM) $(DOCKER_OUT_TYPE)
|
||||||
|
|
||||||
# Define Docker related variables. Releases should modify and double check these vars.
|
# Define Docker related variables. Releases should modify and double check these vars.
|
||||||
REGISTRY ?= hub.kubesphere.com.cn/kubekey
|
REGISTRY ?= docker.io/kubespheredev
|
||||||
#REGISTRY ?= docker.io/kubespheredev
|
#REGISTRY ?= docker.io/kubespheredev
|
||||||
#PROD_REGISTRY ?= docker.io/kubesphere
|
#PROD_REGISTRY ?= docker.io/kubesphere
|
||||||
|
|
||||||
|
|
|
||||||
4
OWNERS
4
OWNERS
|
|
@ -2,7 +2,7 @@ approvers:
|
||||||
- pixiake
|
- pixiake
|
||||||
- 24sama
|
- 24sama
|
||||||
- rayzhou2017
|
- rayzhou2017
|
||||||
- littleBlackHouse
|
- ImitationImmortal
|
||||||
|
|
||||||
reviewers:
|
reviewers:
|
||||||
- pixiake
|
- pixiake
|
||||||
|
|
@ -15,4 +15,4 @@ reviewers:
|
||||||
- wansir
|
- wansir
|
||||||
- LinuxSuRen
|
- LinuxSuRen
|
||||||
- 24sama
|
- 24sama
|
||||||
- littleBlackHouse
|
- ImitationImmortal
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue