mirror of
https://gitea.com/gitea/helm-actions.git
synced 2026-04-06 09:40:56 +00:00
Compare commits
27 Commits
7a73cd04d1
...
christophe
| Author | SHA1 | Date | |
|---|---|---|---|
| 43e1080cd7 | |||
| 6945a48d11 | |||
| 91348eb00b | |||
| 24863ef249 | |||
| 62c14d7877 | |||
| 3625cf2ff2 | |||
| 4a82e5d96d | |||
| 86c8067beb | |||
| a21154e3a6 | |||
| d1c20ced5e | |||
| 4e2e4c4b29 | |||
| 759dffa245 | |||
| 619d048017 | |||
| 2f455431a9 | |||
| 9a3b8afa55 | |||
| e2bc1191d7 | |||
| 2325970518 | |||
| 1c8e4d9ef6 | |||
| 7db5906c08 | |||
| d24696be8c | |||
| 0f5dc3a2d0 | |||
| 3f2fdd9c42 | |||
| b2dff340f0 | |||
| d22b408f74 | |||
| 1e71259275 | |||
| 5722cefc5e | |||
| 0edfe5fba6 |
@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
check-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container: commitlint/commitlint:20.2.0
|
||||
container: commitlint/commitlint:20.4.1
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: check PR title
|
||||
|
||||
76
.gitea/workflows/e2e.yml
Normal file
76
.gitea/workflows/e2e.yml
Normal file
@ -0,0 +1,76 @@
|
||||
on: pull_request
|
||||
jobs:
|
||||
k8s-test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CLUSTER_NAME: test-cluster
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Docker CLI, kind, and kubectl
|
||||
run: |
|
||||
# Install Docker CLI (to talk to the host daemon via the mounted socket)
|
||||
apt-get update && apt-get install -y docker.io jq
|
||||
|
||||
# Install kind
|
||||
curl -Lo /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
|
||||
chmod +x /usr/local/bin/kind
|
||||
|
||||
# Install kubectl
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
install kubectl /usr/local/bin/
|
||||
|
||||
- name: Create kind cluster
|
||||
run: |
|
||||
kind delete cluster test-cluster2
|
||||
|
||||
docker inspect ${CLUSTER_NAME}-control-plane && mkdir -p ~/.kube && kind get kubeconfig --name ${CLUSTER_NAME} > ~/.kube/config || kind create cluster --name ${CLUSTER_NAME} --wait 5m
|
||||
|
||||
- name: Connect kind to the job container's network and fix kubeconfig
|
||||
if: always()
|
||||
run: |
|
||||
# 1. Find the Docker network the job container is on
|
||||
# The job container's hostname is the container ID
|
||||
JOB_CONTAINER_ID=$(hostname)
|
||||
NETWORK_NAME=$(docker inspect "$JOB_CONTAINER_ID" \
|
||||
--format '{{range $k, $v := .NetworkSettings.Networks}}{{$k}}{{end}}')
|
||||
|
||||
echo "NETWORK_NAME=$NETWORK_NAME" >> $GITHUB_ENV
|
||||
|
||||
echo "Job container network: $NETWORK_NAME"
|
||||
|
||||
# 2. Get the kind control-plane container name
|
||||
KIND_CONTAINER="${CLUSTER_NAME}-control-plane"
|
||||
|
||||
echo "KIND_CONTAINER=$KIND_CONTAINER" >> $GITHUB_ENV
|
||||
|
||||
# 3. Connect the kind container to the same network
|
||||
docker network connect "$NETWORK_NAME" "$KIND_CONTAINER"
|
||||
|
||||
# 4. Get the kind container's IP on that network
|
||||
KIND_IP=$(docker inspect "$KIND_CONTAINER" \
|
||||
--format "{{(index .NetworkSettings.Networks \"$NETWORK_NAME\").IPAddress}}")
|
||||
|
||||
echo "Kind container IP on shared network: $KIND_IP"
|
||||
|
||||
# 5. Rewrite the kubeconfig to use the kind container's IP
|
||||
# kind's API server listens on port 6443 inside the container
|
||||
kubectl config set-cluster kind-${CLUSTER_NAME} \
|
||||
--server="https://${KIND_IP}:6443"
|
||||
|
||||
# 6. Since the TLS cert won't match the new IP, use insecure mode
|
||||
# OR set insecure-skip-tls-verify
|
||||
kubectl config set-cluster kind-${CLUSTER_NAME} \
|
||||
--insecure-skip-tls-verify=true
|
||||
|
||||
- name: Verify cluster access
|
||||
if: always()
|
||||
run: |
|
||||
kubectl cluster-info
|
||||
kubectl get nodes
|
||||
kubectl get pods -A
|
||||
|
||||
- name: Disconnect Kind Network
|
||||
if: always()
|
||||
run: |
|
||||
docker network disconnect "$NETWORK_NAME" "$KIND_CONTAINER"
|
||||
@ -7,7 +7,7 @@ on:
|
||||
|
||||
env:
|
||||
# renovate: datasource=docker depName=alpine/helm
|
||||
HELM_VERSION: "3.19.0"
|
||||
HELM_VERSION: "3.20.0"
|
||||
|
||||
jobs:
|
||||
generate-chart-publish:
|
||||
@ -35,7 +35,7 @@ jobs:
|
||||
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: https://github.com/crazy-max/ghaction-import-gpg@v6
|
||||
uses: https://github.com/crazy-max/ghaction-import-gpg@v7
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
|
||||
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
helm registry logout registry-1.docker.io
|
||||
|
||||
- name: aws credential configure
|
||||
uses: https://github.com/aws-actions/configure-aws-credentials@v5
|
||||
uses: https://github.com/aws-actions/configure-aws-credentials@v6
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
@ -15,7 +15,7 @@ env:
|
||||
jobs:
|
||||
check-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
container: alpine/helm:3.19.0
|
||||
container: alpine/helm:3.20.0
|
||||
steps:
|
||||
- name: install tools
|
||||
run: |
|
||||
|
||||
62
pnpm-lock.yaml
generated
62
pnpm-lock.yaml
generated
@ -25,15 +25,15 @@ packages:
|
||||
resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
'@isaacs/brace-expansion@5.0.0':
|
||||
resolution: {integrity: sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==}
|
||||
'@isaacs/brace-expansion@5.0.1':
|
||||
resolution: {integrity: sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
'@types/debug@4.1.12':
|
||||
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
|
||||
|
||||
'@types/katex@0.16.7':
|
||||
resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==}
|
||||
'@types/katex@0.16.8':
|
||||
resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==}
|
||||
|
||||
'@types/ms@2.1.0':
|
||||
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
|
||||
@ -67,8 +67,8 @@ packages:
|
||||
resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
commander@14.0.2:
|
||||
resolution: {integrity: sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==}
|
||||
commander@14.0.3:
|
||||
resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==}
|
||||
engines: {node: '>=20'}
|
||||
|
||||
commander@6.2.1:
|
||||
@ -91,8 +91,8 @@ packages:
|
||||
supports-color:
|
||||
optional: true
|
||||
|
||||
decode-named-character-reference@1.2.0:
|
||||
resolution: {integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==}
|
||||
decode-named-character-reference@1.3.0:
|
||||
resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==}
|
||||
|
||||
deep-extend@0.6.0:
|
||||
resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
|
||||
@ -131,7 +131,7 @@ packages:
|
||||
|
||||
glob@7.2.3:
|
||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||
deprecated: Glob versions prior to v9 are no longer supported
|
||||
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
|
||||
|
||||
ignore@7.0.5:
|
||||
resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==}
|
||||
@ -171,15 +171,15 @@ packages:
|
||||
resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
katex@0.16.27:
|
||||
resolution: {integrity: sha512-aeQoDkuRWSqQN6nSvVCEFvfXdqo1OQiCmmW1kc9xSdjutPv7BGO7pqY9sQRJpMOGrEdfDgF2TfRXe5eUAD2Waw==}
|
||||
katex@0.16.28:
|
||||
resolution: {integrity: sha512-YHzO7721WbmAL6Ov1uzN/l5mY5WWWhJBSW+jq4tkfZfsxmo1hu6frS0EOswvjBUnWE6NtjEs48SFn5CQESRLZg==}
|
||||
hasBin: true
|
||||
|
||||
linkify-it@5.0.0:
|
||||
resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
|
||||
|
||||
lodash@4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
lodash@4.17.23:
|
||||
resolution: {integrity: sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==}
|
||||
|
||||
markdown-it@14.1.0:
|
||||
resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
|
||||
@ -275,8 +275,8 @@ packages:
|
||||
micromark@4.0.2:
|
||||
resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==}
|
||||
|
||||
minimatch@10.1.1:
|
||||
resolution: {integrity: sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==}
|
||||
minimatch@10.1.2:
|
||||
resolution: {integrity: sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==}
|
||||
engines: {node: 20 || >=22}
|
||||
|
||||
minimatch@3.1.2:
|
||||
@ -351,13 +351,13 @@ snapshots:
|
||||
dependencies:
|
||||
commander: 13.1.0
|
||||
dot-object: 2.1.5
|
||||
lodash: 4.17.21
|
||||
lodash: 4.17.23
|
||||
markdown-table: 2.0.0
|
||||
yaml: 2.8.2
|
||||
|
||||
'@isaacs/balanced-match@4.0.1': {}
|
||||
|
||||
'@isaacs/brace-expansion@5.0.0':
|
||||
'@isaacs/brace-expansion@5.0.1':
|
||||
dependencies:
|
||||
'@isaacs/balanced-match': 4.0.1
|
||||
|
||||
@ -365,7 +365,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/ms': 2.1.0
|
||||
|
||||
'@types/katex@0.16.7': {}
|
||||
'@types/katex@0.16.8': {}
|
||||
|
||||
'@types/ms@2.1.0': {}
|
||||
|
||||
@ -390,7 +390,7 @@ snapshots:
|
||||
|
||||
commander@13.1.0: {}
|
||||
|
||||
commander@14.0.2: {}
|
||||
commander@14.0.3: {}
|
||||
|
||||
commander@6.2.1: {}
|
||||
|
||||
@ -402,7 +402,7 @@ snapshots:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
|
||||
decode-named-character-reference@1.2.0:
|
||||
decode-named-character-reference@1.3.0:
|
||||
dependencies:
|
||||
character-entities: 2.0.2
|
||||
|
||||
@ -468,7 +468,7 @@ snapshots:
|
||||
|
||||
jsonpointer@5.0.1: {}
|
||||
|
||||
katex@0.16.27:
|
||||
katex@0.16.28:
|
||||
dependencies:
|
||||
commander: 8.3.0
|
||||
|
||||
@ -476,7 +476,7 @@ snapshots:
|
||||
dependencies:
|
||||
uc.micro: 2.1.0
|
||||
|
||||
lodash@4.17.21: {}
|
||||
lodash@4.17.23: {}
|
||||
|
||||
markdown-it@14.1.0:
|
||||
dependencies:
|
||||
@ -493,7 +493,7 @@ snapshots:
|
||||
|
||||
markdownlint-cli@0.47.0:
|
||||
dependencies:
|
||||
commander: 14.0.2
|
||||
commander: 14.0.3
|
||||
deep-extend: 0.6.0
|
||||
ignore: 7.0.5
|
||||
js-yaml: 4.1.1
|
||||
@ -501,7 +501,7 @@ snapshots:
|
||||
jsonpointer: 5.0.1
|
||||
markdown-it: 14.1.0
|
||||
markdownlint: 0.40.0
|
||||
minimatch: 10.1.1
|
||||
minimatch: 10.1.2
|
||||
run-con: 1.3.2
|
||||
smol-toml: 1.5.2
|
||||
tinyglobby: 0.2.15
|
||||
@ -526,7 +526,7 @@ snapshots:
|
||||
|
||||
micromark-core-commonmark@2.0.3:
|
||||
dependencies:
|
||||
decode-named-character-reference: 1.2.0
|
||||
decode-named-character-reference: 1.3.0
|
||||
devlop: 1.1.0
|
||||
micromark-factory-destination: 2.0.1
|
||||
micromark-factory-label: 2.0.1
|
||||
@ -581,9 +581,9 @@ snapshots:
|
||||
|
||||
micromark-extension-math@3.1.0:
|
||||
dependencies:
|
||||
'@types/katex': 0.16.7
|
||||
'@types/katex': 0.16.8
|
||||
devlop: 1.1.0
|
||||
katex: 0.16.27
|
||||
katex: 0.16.28
|
||||
micromark-factory-space: 2.0.1
|
||||
micromark-util-character: 2.1.1
|
||||
micromark-util-symbol: 2.0.1
|
||||
@ -678,7 +678,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/debug': 4.1.12
|
||||
debug: 4.4.3
|
||||
decode-named-character-reference: 1.2.0
|
||||
decode-named-character-reference: 1.3.0
|
||||
devlop: 1.1.0
|
||||
micromark-core-commonmark: 2.0.3
|
||||
micromark-factory-space: 2.0.1
|
||||
@ -696,9 +696,9 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
minimatch@10.1.1:
|
||||
minimatch@10.1.2:
|
||||
dependencies:
|
||||
'@isaacs/brace-expansion': 5.0.0
|
||||
'@isaacs/brace-expansion': 5.0.1
|
||||
|
||||
minimatch@3.1.2:
|
||||
dependencies:
|
||||
@ -717,7 +717,7 @@ snapshots:
|
||||
'@types/unist': 2.0.11
|
||||
character-entities-legacy: 3.0.0
|
||||
character-reference-invalid: 2.0.1
|
||||
decode-named-character-reference: 1.2.0
|
||||
decode-named-character-reference: 1.3.0
|
||||
is-alphanumerical: 2.0.1
|
||||
is-decimal: 2.0.1
|
||||
is-hexadecimal: 2.0.1
|
||||
|
||||
@ -84,7 +84,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gitea.actions.local_root_url" -}}
|
||||
{{- .Values.giteaRootURL -}}
|
||||
{{- tpl .Values.giteaRootURL . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
||||
@ -429,3 +429,35 @@ tests:
|
||||
content:
|
||||
mountPath: /mnt
|
||||
name: my-dind-volume
|
||||
- it: should interpret Gitea Root URL templating
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
global:
|
||||
gitea:
|
||||
service:
|
||||
name: "my-gitea-svc-http"
|
||||
port: 3210
|
||||
enabled: true
|
||||
giteaRootURL: "http://{{ .Values.global.gitea.service.name }}:{{ .Values.global.gitea.service.port }}"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- containsDocument:
|
||||
kind: StatefulSet
|
||||
apiVersion: apps/v1
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[1].name
|
||||
value: "GITEA_INSTANCE_URL"
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env[1].value
|
||||
value: "http://my-gitea-svc-http:3210"
|
||||
- equal:
|
||||
path: spec.template.spec.initContainers[0].command[2]
|
||||
value: |
|
||||
echo 'Trying to reach Gitea on http://my-gitea-svc-http:3210'
|
||||
until timeout 10 wget --no-check-certificate --spider http://my-gitea-svc-http:3210; do
|
||||
sleep 3
|
||||
echo "Trying again in 3 seconds..."
|
||||
done
|
||||
echo "Gitea has been reached!"
|
||||
|
||||
Reference in New Issue
Block a user