mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-07-04 23:34:12 +02:00
19e9b07e6e
This reverts d5ce1a47ea
and therefore adds the GPG feature back into main.
As it is a breaking change, this PR now also contains the required upgrade notes.
Closes #107 again.
Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/374
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Reviewed-by: John Olheiser <john+gitea@jolheiser.com>
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
suite: Init template
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/init.yaml
|
|
tests:
|
|
- it: runs gpg in batch mode
|
|
set:
|
|
signing.enabled: true
|
|
asserts:
|
|
- equal:
|
|
path: stringData.[configure_gpg_environment.sh]
|
|
value: |-
|
|
#!/usr/bin/env bash
|
|
set -eu
|
|
|
|
gpg --batch --import /raw/private.asc
|
|
- it: skips gpg script block for disabled signing
|
|
asserts:
|
|
- equal:
|
|
path: stringData.[init_directory_structure.sh]
|
|
value: |-
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
set -x
|
|
chown 1000:1000 /data
|
|
mkdir -p /data/git/.ssh
|
|
chmod -R 700 /data/git/.ssh
|
|
[ ! -d /data/gitea/conf ] && mkdir -p /data/gitea/conf
|
|
|
|
# prepare temp directory structure
|
|
mkdir -p "${GITEA_TEMP}"
|
|
chown 1000:1000 "${GITEA_TEMP}"
|
|
chmod ug+rwx "${GITEA_TEMP}"
|
|
- it: adds gpg script block for enabled signing
|
|
set:
|
|
signing.enabled: true
|
|
asserts:
|
|
- equal:
|
|
path: stringData.[init_directory_structure.sh]
|
|
value: |-
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
set -x
|
|
chown 1000:1000 /data
|
|
mkdir -p /data/git/.ssh
|
|
chmod -R 700 /data/git/.ssh
|
|
[ ! -d /data/gitea/conf ] && mkdir -p /data/gitea/conf
|
|
|
|
# prepare temp directory structure
|
|
mkdir -p "${GITEA_TEMP}"
|
|
chown 1000:1000 "${GITEA_TEMP}"
|
|
chmod ug+rwx "${GITEA_TEMP}"
|
|
|
|
if [ ! -d "${GNUPGHOME}" ]; then
|
|
mkdir -p "${GNUPGHOME}"
|
|
chmod 700 "${GNUPGHOME}"
|
|
chown 1000:1000 "${GNUPGHOME}"
|
|
fi
|