diff --git a/.vib/gitea/goss/gitea.yaml b/.vib/gitea/goss/gitea.yaml new file mode 100644 index 000000000000..68e2ce3d85ac --- /dev/null +++ b/.vib/gitea/goss/gitea.yaml @@ -0,0 +1,59 @@ +group: + gitea: + exists: true +user: + gitea: + exists: true +file: + /opt/bitnami/gitea: + exists: true + mode: "0775" + owner: gitea + group: root + filetype: directory + /opt/bitnami/gitea/bin/gitea: + exists: true + mode: "0775" + filetype: file + /opt/bitnami/gitea/custom: + exists: true + mode: "0775" + owner: gitea + group: root + filetype: directory + /opt/bitnami/gitea/data: + exists: true + mode: "0775" + owner: gitea + group: root + filetype: directory + /opt/bitnami/gitea/tmp: + exists: true + mode: "0775" + owner: gitea + group: root + filetype: directory + /opt/bitnami/gitea/tmp/log: + exists: true + mode: "0775" + owner: gitea + group: root + filetype: directory + /bitnami/gitea: + exists: true + mode: "0775" + owner: gitea + group: root + filetype: directory + /opt/bitnami/gitea/custom/conf/app.ini: + exists: true + mode: "0664" + owner: gitea + group: root + filetype: file +command: + check-app-run: + exec: timeout --preserve-status 5 gitea web + exit-status: 0 + stdout: + - "/Starting.*Web.*server/" diff --git a/.vib/gitea/goss/goss.yaml b/.vib/gitea/goss/goss.yaml new file mode 100644 index 000000000000..8da4c39169d3 --- /dev/null +++ b/.vib/gitea/goss/goss.yaml @@ -0,0 +1,11 @@ +gossfile: + # Goss tests exclusive to the current container + ../../gitea/goss/gitea.yaml: {} + # Load scripts from .vib/common/goss/templates + ../../common/goss/templates/check-app-version.yaml: {} + ../../common/goss/templates/check-binaries.yaml: {} + ../../common/goss/templates/check-broken-symlinks.yaml: {} + ../../common/goss/templates/check-ca-certs.yaml: {} + ../../common/goss/templates/check-linked-libraries.yaml: {} + ../../common/goss/templates/check-sed-in-place.yaml: {} + ../../common/goss/templates/check-spdx.yaml: {} diff --git a/.vib/gitea/goss/vars.yaml b/.vib/gitea/goss/vars.yaml new file mode 100644 index 000000000000..b85464fd87e6 --- /dev/null +++ b/.vib/gitea/goss/vars.yaml @@ -0,0 +1,9 @@ +binaries: + - gitea + - ini-file + - render-template + - wait-for-port +version: + bin_name: gitea + flag: --version +root_dir: /opt/bitnami diff --git a/.vib/gitea/vib-publish.json b/.vib/gitea/vib-publish.json index 8b6fe8eab4e6..0221fe562138 100644 --- a/.vib/gitea/vib-publish.json +++ b/.vib/gitea/vib-publish.json @@ -3,7 +3,8 @@ "resources": { "url": "{VIB_ENV_CONTAINER_URL}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -33,6 +34,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "gitea/goss/goss.yaml", + "vars_file": "gitea/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-gitea" + } + } + } + }, { "action_id": "trivy", "params": { diff --git a/.vib/gitea/vib-verify.json b/.vib/gitea/vib-verify.json index a34e8aee9161..9edbac8e7ed7 100644 --- a/.vib/gitea/vib-verify.json +++ b/.vib/gitea/vib-verify.json @@ -3,7 +3,8 @@ "resources": { "url": "{SHA_ARCHIVE}", "path": "{VIB_ENV_PATH}" - } + }, + "runtime_parameters": "Y29tbWFuZDogWyJ0YWlsIiwgIi1mIiwgIi9kZXYvbnVsbCJd" }, "phases": { "package": { @@ -29,6 +30,21 @@ }, "verify": { "actions": [ + { + "action_id": "goss", + "params": { + "resources": { + "path": "/.vib" + }, + "tests_file": "gitea/goss/goss.yaml", + "vars_file": "gitea/goss/vars.yaml", + "remote": { + "pod": { + "workload": "deploy-gitea" + } + } + } + }, { "action_id": "trivy", "params": {