1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

Release Helm charts (#302)

closes #261
This commit is contained in:
Anbraten 2021-09-24 14:04:54 +02:00 committed by GitHub
parent e34daae0cf
commit 0009c19f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 94 additions and 64 deletions

41
.woodpecker/helm.yml Normal file
View File

@ -0,0 +1,41 @@
clone:
git:
image: plugins/git:next
pipeline:
set-version:
image: alpine/helm:3.5.3
commands:
# use tag name or 0.0.0 if not running on a tag
- export CHART_VERSION="${DRONE_TAG##v}"
- export CHART_VERSION=$${CHART_VERSION:=0.0.0}
- echo "Version $CHART_VERSION"
- sed -i "s/<version>/$CHART_VERSION/g" charts/woodpecker-agent/Chart.yaml
- sed -i "s/<version>/$CHART_VERSION/g" charts/woodpecker-server/Chart.yaml
- cat charts/woodpecker-agent/Chart.yaml
- cat charts/woodpecker-server/Chart.yaml
when:
path: "charts/**"
lint:
image: alpine/helm:3.5.3
commands:
- helm lint charts/woodpecker-agent/
- helm lint charts/woodpecker-server/
when:
path: "charts/**"
release:
image: quay.io/helmpack/chart-releaser:v1.2.1
secrets:
- source: github_token
target: CR_TOKEN
commands:
- mkdir -p .cr-index
- cr package charts/woodpecker-server
- cr package charts/woodpecker-agent
- cr upload --owner woodpecker-ci --git-repo woodpecker-ci.github.io --release-name-template "helm-{{ .Name }}-{{ .Version }}"
- cr index --owner woodpecker-ci --git-repo woodpecker-ci.github.io --pages-branch main --charts-repo https://woodpecker-ci.github.io --push --release-name-template "helm-{{ .Name }}-{{ .Version }}"
when:
event: tag
path: "charts/**"

View File

@ -1,49 +0,0 @@
# Woodpecker
[Woodpecker](https://woodpecker-ci.github.io/) is a fork of the Drone CI system version 0.8, right before the 1.0 release and license changes
## Installing Woodpecker server
### Requirements
```
kubectl create secret generic drone-secret \
--namespace sre \
--from-literal=DRONE_SECRET=$(openssl rand -hex 32)
```
[GitHub](https://woodpecker-ci.github.io/docs/administration)
```
kubectl create secret generic drone-github-client \
--namespace <namespace> \
--from-literal=DRONE_GITHUB_CLIENT=xxxxxxxx
```
```
kubectl create secret generic drone-github-secret \
--namespace <namespace> \
--from-literal=DRONE_GITHUB_SECRET=xxxxxxxx
```
```
helm upgrade --install woodpecker-server --namespace <namespace> woodpecker-server/
```
## Installing Woodpecker agent
```
helm upgrade --install woodpecker-agent --namespace <namespace> woodpecker-agent/
```
## Uninstall
```
helm delete woodpecker-agent
helm delete woodpecker-server
```
## Support
For questions, suggestions, and discussion, visit the [Discord](https://discord.gg/fcMQqSMXJy).

View File

@ -1,9 +1,9 @@
apiVersion: v2
name: woodpecker-agent
description: A Helm chart for Woodpecker, a fork of the Drone CI system
description: A Helm chart for the Woodpecker agent
type: application
version: 0.1.1
appVersion: "v0.13.0-rc.3"
version: <version>
appVersion: "<version>"
keywords:
- continuous-delivery
- continuous-deployment

View File

@ -8,10 +8,10 @@ image:
tag: ""
env:
DRONE_SERVER: "woodpecker-server.<namespace>.svc.cluster.local:9000"
WOODPECKER_SERVER: "woodpecker-server.<namespace>.svc.cluster.local:9000"
extraSecretNamesForEnvFrom:
- drone-secret
- woodpecker-secret
imagePullSecrets: []
nameOverride: ""

View File

@ -1,9 +1,9 @@
apiVersion: v2
name: woodpecker-server
description: A Helm chart for Woodpecker a fork of the Drone CI system
description: A Helm chart for the Woodpecker server
type: application
version: 0.1.0
appVersion: "v0.13.0-rc.3"
version: <version>
appVersion: "<version>"
keywords:
- continuous-delivery
- continuous-deployment

View File

@ -8,14 +8,14 @@ image:
tag: ""
env:
DRONE_ADMIN: "xxxx"
DRONE_HOST: https://"xxxxxxx"
DRONE_GITHUB: true
WOODPECKER_ADMIN: "xxxx"
WOODPECKER_HOST: https://"xxxxxxx"
WOODPECKER_GITHUB: true
extraSecretNamesForEnvFrom:
- drone-github-client
- drone-github-secret
- drone-secret
- woodpecker-github-client
- woodpecker-github-secret
- woodpecker-secret
persistentVolume:
enabled: true

View File

@ -4,7 +4,45 @@ Woodpecker does not support Kubernetes natively, but being a container first CI
## Deploy with HELM
TODO
### Preparation
```shell
# create secrets
kubectl create secret generic woodpecker-secret \
--namespace <namespace> \
--from-literal=WOODPECKER_SECRET=$(openssl rand -hex 32)
kubectl create secret generic woodpecker-github-client \
--namespace <namespace> \
--from-literal=WOODPECKER_GITHUB_CLIENT=xxxxxxxx
kubectl create secret generic woodpecker-github-secret \
--namespace <namespace> \
--from-literal=WOODPECKER_GITHUB_SECRET=xxxxxxxx
# add helm repo
helm repo add woodpecker https://woodpecker-ci.github.io/
```
### Woodpecker server
```shell
# Install
helm upgrade --install woodpecker-server --namespace <namespace> woodpecker/woodpecker-server
# Uninstall
helm delete woodpecker-server
```
## Woodpecker agent
```shell
# Install
helm upgrade --install woodpecker-agent --namespace <namespace> woodpecker/woodpecker-agent
# Uninstall
helm delete woodpecker-agent
```
## Deploy with kubectl