A single-file PHP demo that displays the environment variables a Probo CI build injects into a container. It renders two tables:
- Build variables — the documented Probo catalog (
PROBO_ENVIRONMENT,BUILD_ID,BRANCH_NAME, …) with live values where present. - Secrets & other injected variables — everything else Probo made visible to PHP (organization/project secrets and any custom variables), discovered dynamically.
The page reads the environment the same way the container exposes it — mirroring
the filter in probo-ubuntu/<image>/files/envvars-swap.sh, which drops
APACHE_* and the shell internals (HOME/LANG/PWD/PATH/OLDPWD/SHLVL/_). It
falls back to $_ENV / $_SERVER on older runtimes (PHP 5.6 / 7.0) where
getenv() with no arguments is unavailable, so it works across the full range of
Probo PHP images.
.probo.yaml Probo build config (lamp type + LAMPApp plugin step)
src/index.php Env filtering + two-table page render
php -S localhost:8000 -t src
# then open http://localhost:8000Simulate a Probo build environment:
PROBO_ENVIRONMENT=TRUE BUILD_ID=abc123 BRANCH_NAME=main \
MY_API_TOKEN=example php -S localhost:8000 -t src.probo.yaml uses type: lamp with php: 8.5 and database: mariadb:11.4
(provisioning Linux, Apache, MariaDB, and PHP) plus the built-in LAMPApp
plugin:
type: lamp
php: 8.5
database: mariadb:11.4
steps:
- name: Testing
plugin: LAMPApp
phpIniOptions:
memory_limit: 512M
max_execution_time: 300
subDirectory: srcThe LAMPApp plugin serves the app from src (the subDirectory) under Apache
and applies the phpIniOptions overrides. Standard Probo build variables are
passed automatically and populate the first table; secrets and custom variables
appear in the second.