Compare commits
1 Commits
init-proje
...
0.1.0-dev-
| Author | SHA1 | Date | |
|---|---|---|---|
|
fc6fdf1618
|
32
.woodpecker/build-tagged-version-github.yaml
Normal file
32
.woodpecker/build-tagged-version-github.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- PACKAGE_NAME: badhouseplants/rustfs-manager-operator-docs
|
||||||
|
DIR: ./documentation
|
||||||
|
- PACKAGE_NAME: badhouseplants/rustfs-manager-operator
|
||||||
|
DIR: ./operator
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build and push a tagged container
|
||||||
|
image: gitea.badhouseplants.net/badhouseplants/container-builder
|
||||||
|
environment:
|
||||||
|
CONTAINER_REGISTRY: ghcr.io
|
||||||
|
REGISTRY_TOKEN:
|
||||||
|
from_secret: GITHUB_REGISTRY_TOKEN
|
||||||
|
REGISTRY_USER: kindabot
|
||||||
|
privileged: true
|
||||||
|
commands:
|
||||||
|
- cd $DIR && build-container
|
||||||
|
backend_options:
|
||||||
|
kubernetes:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 700Mi
|
||||||
|
cpu: 1000m
|
||||||
|
limits:
|
||||||
|
cpu: 1000m
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
47
.woodpecker/publish-tagged-helm-chart-github.yaml
Normal file
47
.woodpecker/publish-tagged-helm-chart-github.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build and push helm charts
|
||||||
|
image: quay.io/helmpack/chart-testing:v3.14.0
|
||||||
|
environment:
|
||||||
|
REGISTRY_TOKEN:
|
||||||
|
from_secret: GITHUB_REGISTRY_TOKEN
|
||||||
|
REGISTRY_USER: kindabot
|
||||||
|
commands:
|
||||||
|
- apk update && apk add yq
|
||||||
|
- helm registry login ghcr.io --username=$REGISTRY_USER --password=$REGISTRY_TOKEN
|
||||||
|
|
||||||
|
- |-
|
||||||
|
for chart in $(find helm -maxdepth 1 -mindepth 1 -type d); do
|
||||||
|
if [ "$CI_COMMIT_BRANCH" != "main" ]; then
|
||||||
|
yq e -i ".version += env(SHA)" "$chart/Chart.yaml"
|
||||||
|
fi
|
||||||
|
helm dep build $chart
|
||||||
|
helm package $chart -d chart-packages;
|
||||||
|
done
|
||||||
|
- export CHARTS=$(find chart-packages -maxdepth 1 -mindepth 1 -type f)
|
||||||
|
- export REGISTRY=$(echo oci://ghcr.io/$CI_REPO | tr '[:upper:]' '[:lower:]')
|
||||||
|
- |-
|
||||||
|
for chart in $CHARTS; do
|
||||||
|
echo ${chart}
|
||||||
|
CHART_NAME=$(helm show chart "${chart}" | yq .name)
|
||||||
|
CHART_VERSION=$(helm show chart "${chart}" | yq .version)
|
||||||
|
if helm pull ${REGISTRY}/${CHART_NAME}:${CHART_VERSION}; then
|
||||||
|
echo "Chart is found in the upstream: ${CHART_NAME}:${CHART_VERSION}"
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
helm push "$chart" "$REGISTRY"
|
||||||
|
done
|
||||||
|
backend_options:
|
||||||
|
kubernetes:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 700Mi
|
||||||
|
cpu: 1000m
|
||||||
|
limits:
|
||||||
|
cpu: 1000m
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
Reference in New Issue
Block a user