ci: add deploy step
This commit is contained in:
parent
8fb2576879
commit
fb985f2f75
20
.woodpecker/.build-chart.yaml
Normal file
20
.woodpecker/.build-chart.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
when:
|
||||
- branch: trunk
|
||||
path:
|
||||
include: [
|
||||
'chart/*',
|
||||
'.woodpecker/.build-chart.yaml'
|
||||
]
|
||||
|
||||
steps:
|
||||
- name: build-chart
|
||||
image: dtzar/helm-kubectl:${HELM_VER}
|
||||
environment:
|
||||
- HELM_EXPERIMENTAL_OCI=1
|
||||
commands:
|
||||
- export CHART_NAME=$(yq '.name' <chart/Chart.yaml)
|
||||
- export CHART_VER=$(yq '.version' <chart/Chart.yaml)
|
||||
- helm registry login registry-1.docker.io --username $CI_REGISTRY_USER --password $CI_REGISTRY_PASSWORD
|
||||
- helm package chart
|
||||
- helm push $CHART_NAME-$CHART_VER.tgz oci://registry-1.docker.io/grumble/
|
||||
secrets: [CI_REGISTRY_USER, CI_REGISTRY_PASSWORD]
|
|
@ -11,7 +11,7 @@ when:
|
|||
]
|
||||
|
||||
steps:
|
||||
- name: build-container
|
||||
- name: build
|
||||
image: gcr.io/kaniko-project/executor:${KANIKO_VER}-debug
|
||||
environment:
|
||||
- container=kube
|
22
.woodpecker/.deploy.yaml
Normal file
22
.woodpecker/.deploy.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
when:
|
||||
- branch: trunk
|
||||
path:
|
||||
include: [
|
||||
'chart/*',
|
||||
'.woodpecker/.deploy.yaml'
|
||||
]
|
||||
|
||||
variables:
|
||||
- &kubectl_setup mkdir -p /root/.kube && echo "$KUBEAUTH" | base64 -d > /root/.kube/config && chmod 0600 /root/.kube/config
|
||||
|
||||
steps:
|
||||
- name: deploy
|
||||
image: dtzar/helm-kubectl:${HELM_VER}
|
||||
commands:
|
||||
- *kubectl_setup
|
||||
- helm dependency update chart
|
||||
- helm upgrade --install --set image.tag="$CI_COMMIT_SHA" --namespace mednafen asuka chart --atomic
|
||||
secrets: [KUBEAUTH]
|
||||
|
||||
depends_on:
|
||||
- build
|
|
@ -1,6 +1,6 @@
|
|||
dependencies:
|
||||
- name: mednafen-server
|
||||
repository: file://../../mednafen-server/chart
|
||||
- name: mednafen-helm
|
||||
repository: oci://registry-1.docker.io/grumble
|
||||
version: 0.2.0
|
||||
digest: sha256:cba097297f684565a23d9f97e45abc302cd274cf6c7ecb3c7462bb1835df209f
|
||||
generated: "2023-04-24T10:29:59.330495915-07:00"
|
||||
digest: sha256:57d19c47dcaf4f4170c9e13545fc73e5d98c2667dc1f10b2e57a6427921e76c7
|
||||
generated: "2024-02-13T22:21:20.202981477-08:00"
|
||||
|
|
|
@ -15,7 +15,7 @@ type: application
|
|||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
version: 0.2.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
@ -24,7 +24,6 @@ version: 0.1.0
|
|||
appVersion: "69"
|
||||
|
||||
dependencies:
|
||||
- name: mednafen-server
|
||||
- name: mednafen-helm
|
||||
version: 0.2.0
|
||||
# repository: oci://registry-1.docker.io/grumble
|
||||
repository: file://../../mednafen-server/chart
|
||||
repository: oci://registry-1.docker.io/grumble
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: grumble/120
|
||||
pullPolicy: Always
|
||||
repository: grumble/120.bitch.city
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 69
|
||||
|
||||
imagePullSecrets: []
|
||||
|
|
Loading…
Reference in a new issue