mirror of
https://github.com/bitnami/containers.git
synced 2026-10-18 07:08:03 +02:00
[bitnami/symfony] Add VIB tests (#30019)
* [bitnami/symfony] Add VIB tests Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add triggers Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Fix VIB pipeline Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Fix test 'composer --help' Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Fix test 'composer --help' allow as root Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove composer version test Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add common/check-php-fpm.yaml Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add symfony base dir Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add links-to Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove gosu Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Remove triggers Signed-off-by: Miguel Ruiz <miruiz@vmware.com> --------- Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
file:
|
||||
/opt/bitnami/php/etc/php.ini:
|
||||
exists: true
|
||||
contains:
|
||||
- /^opcache.interned_strings_buffer = 16/
|
||||
- /^opcache.memory_consumption = 192/
|
||||
- /^opcache.file_cache = \/opt\/bitnami\/php\/var\/run\/opcache_file/
|
||||
- /^upload_tmp_dir = \/opt\/bitnami\/php\/tmp/
|
||||
- /^session.save_path = \/opt\/bitnami\/php\/var\/run\/session/
|
||||
- /^error_log = \/dev\/stderr/
|
||||
/opt/bitnami/php/etc/php-fpm.d/www.conf:
|
||||
exists: true
|
||||
contains:
|
||||
- /^listen = \/opt\/bitnami\/php\/var\/run\/www.sock/
|
||||
/opt/bitnami/php/logs/php-fpm.log:
|
||||
exists: true
|
||||
filetype: symlink
|
||||
linked-to: /dev/stdout
|
||||
/opt/bitnami/php/etc/common.conf.disabled:
|
||||
exists: true
|
||||
filetype: file
|
||||
/opt/bitnami/php/etc:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0775"
|
||||
/opt/bitnami/php/tmp:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0775"
|
||||
/opt/bitnami/php/var/run:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0775"
|
||||
/opt/bitnami/php/logs:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0775"
|
||||
/opt/bitnami/php/var/run/session:
|
||||
exists: true
|
||||
filetype: directory
|
||||
mode: "0775"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
gossfile:
|
||||
# Goss tests exclusive to the current container
|
||||
../../symfony/goss/symfony.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-directories.yaml: {}
|
||||
../../common/goss/templates/check-files.yaml: {}
|
||||
../../common/goss/templates/check-linked-libraries.yaml: {}
|
||||
../../common/goss/templates/check-php-fpm.yaml: {}
|
||||
../../common/goss/templates/check-sed-in-place.yaml: {}
|
||||
../../common/goss/templates/check-spdx.yaml: {}
|
||||
@@ -0,0 +1,16 @@
|
||||
command:
|
||||
check-composer-help:
|
||||
exec: COMPOSER_ALLOW_SUPERUSER=1 composer --help
|
||||
exit-status: 0
|
||||
# Check that the version of symfony in the composer.json matches the current version
|
||||
check-composer-json:
|
||||
exec: export MINOR_VERSION=$(echo "{{ .Env.APP_VERSION }}" | cut -d "." -f-2); grep -P "\"extra\".*\"symfony\".*\"require\":\"${MINOR_VERSION}\.\*\"" /opt/bitnami/symfony/skeleton/composer.json
|
||||
exit-status: 0
|
||||
file:
|
||||
/opt/bitnami/symfony/skeleton/symfony.lock:
|
||||
exists: true
|
||||
contains:
|
||||
- symfony/webapp-pack
|
||||
/opt/bitnami/symfony/skeleton/var/cache:
|
||||
exists: false
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
binaries:
|
||||
- php
|
||||
- composer
|
||||
- mysql
|
||||
files:
|
||||
- paths:
|
||||
- /opt/bitnami/symfony/skeleton/bin/console
|
||||
- /opt/bitnami/symfony/skeleton/bin/phpunit
|
||||
directories:
|
||||
- mode: "0775"
|
||||
paths:
|
||||
- /app
|
||||
- /opt/bitnami/symfony
|
||||
- /opt/bitnami/symfony/skeleton
|
||||
root_dir: /opt/bitnami
|
||||
version:
|
||||
bin_name: php /opt/bitnami/symfony/skeleton/bin/console
|
||||
flag: --version
|
||||
@@ -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": "symfony/goss/goss.yaml",
|
||||
"vars_file": "symfony/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-symfony"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
@@ -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": "symfony/goss/goss.yaml",
|
||||
"vars_file": "symfony/goss/vars.yaml",
|
||||
"remote": {
|
||||
"pod": {
|
||||
"workload": "deploy-symfony"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "trivy",
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user