-
Notifications
You must be signed in to change notification settings - Fork 17
Running a script before deployment
Cyril Rohr edited this page Mar 13, 2026
·
2 revisions
Use the pre_script input to run a local bash script inline over SSH before PullPreview runs the selected deployment target.
This works for both deployment targets:
- before
docker compose upfordeployment_target: compose - before the Helm release install or upgrade for
deployment_target: helm
pre_script is resolved relative to app_path.
Before the script runs, PullPreview sources /etc/pullpreview/env, so your script can use values such as:
PULLPREVIEW_URLPULLPREVIEW_PUBLIC_DNSPULLPREVIEW_PUBLIC_IPPULLPREVIEW_DEPLOYMENT_TARGETPULLPREVIEW_NAMESPACEPULLPREVIEW_RELEASE_NAMEPULLPREVIEW_FIRST_RUN
That makes pre_script useful for:
- first-run seeding
- target-specific setup
- migrations or other one-off preparation steps
See also Environment variables.