Publishing
The pd4castr publish command is the final step in the authoring workflow. It
registers your model with the pd4castr platform, builds and pushes your Docker
image to the private registry, uploads static input files, and triggers a model
run.
What Publish Does
At a high level, the publish command performs these steps:
- Registers (or updates) the model on the pd4castr platform.
- Builds and pushes the Docker image to the private container registry.
- Uploads any static input files.
- Triggers a model run.
The exact flow depends on whether you’re publishing for the first time or updating an existing model.
First-Time Publish
The publish flow for a new model:
- The CLI displays a summary of your model configuration and prompts for confirmation.
- Unless you pass
--skip-checks, the CLI validates your input files and runspd4castr testinternally to verify the model IO contract. - The CLI creates your model on the platform with your full
.pd4castrrc.jsonconfiguration. - A new model group is created and the revision starts at
r0. - The CLI pushes your model’s Docker image to a private container registry scoped to your organisation.
- If your model has static inputs, the CLI uploads them to the platform.
- Unless you pass
--skip-trigger, the CLI triggers the first model run.
Updating an Existing Model
When your model has already been published, the publish flow will prompt you to choose between two options:
- New revision (
r0tor1,r1tor2, and so on) — Creates a new model entry in the same model group with an incremented revision number. Previous revisions remain available in the pd4castr UI. - Update existing revision — Updates the current revision in place. Historical data is preserved but no guarantees are made about accuracy or completeness of data in the pd4castr UI.
After choosing an option, the flow continues with the same build, push, upload, and trigger steps as a first-time publish.
Non-Interactive Mode
For non-interactive environments (CI pipelines, scripts, etc.), use
--non-interactive to skip all confirmation prompts. When publishing a new
model (no $$id in the config), no extra flags are needed:
pd4castr publish --config .pd4castrrc.json --non-interactiveWhen publishing an existing model, you must also specify --publish-action to
tell the CLI which path to take:
# update the current revision in place
pd4castr publish --config .pd4castrrc.json --non-interactive --publish-action=update
# create a new revision
pd4castr publish --config .pd4castrrc.json --non-interactive --publish-action=new-revisionThe CLI errors if --publish-action is omitted for an existing model in
non-interactive mode.
Publish Command Flags
The following flags are available for the pd4castr publish command:
| Flag | Default | Description |
|---|---|---|
-c, --config | .pd4castrrc.json | Path to the config file. |
-i, --input-dir | test_input | Directory containing input files. |
-p, --port | 9800 | Port for the IO testing web server. |
--skip-checks (--sc) | false | Skip IO validation. |
--skip-trigger (--st) | false | Skip triggering a model run after publish. |
--non-interactive | false | Skip all confirmation prompts. |
--publish-action | Action for existing models: update or new-revision. Required with --non-interactive. |
After Publishing
Once your model is live, you can verify and configure it.
- Open the pd4castr UI to see your model’s first run results (if a run was triggered).
- If your model uses
AUTOMATICrun mode, it will now run automatically whenever all required input data arrives. See Run modes and scheduling for details. - Use the Author dashboard to monitor run status and manage your model.
Next Steps
- Learn how your model runs are triggered in Run modes and scheduling.
- Review the Testing your model guide if you need to validate your model before publishing.