Build and Deploy
Understanding the Build Process
A Build is an immutable artifact created from a specific source code revision (e.g., v1). During this phase, the platform resolves dependencies, compiles your code and prepares the environment for execution.
Creating a Build
The build create command triggers the build process on the platform.
fathom intelligence function build create <FUNCTION_ID> [OPTIONS]
Build Options
| Option | Description |
|---|---|
| –revision, -r | The source revision to build. If omitted, the CLI defaults to the most recent revision. |
| –auto-deploy, -a | If the build succeeds, the CLI will automatically trigger a deployment. |
| –watch | Starts an interactive watch mode to track build progress in real-time. |
| –time | Prepends timestamps to the build output logs. |
Example: Build with Auto-Deploy
> fathom i function build create 44b18587-5eb1-4261-a90e-fa6852bc8086
--revision v1
--auto-deploy
--watch
build created: c4c9e7c6-a93e-43a3-ac14-705691c38f72
(... logs)
build finished: c4c9e7c6-a93e-43a3-ac14-705691c38f72
Monitoring Builds
Since builds happen asynchronously on the platform, you can monitor their status and logs to troubleshoot any compilation or dependency errors.
Listing Builds
To see the history and status of all builds for your current context:
fathom intelligence function build list
Viewing Build Logs
If a build fails or you want to see the detailed compilation output, use the logs command. Note that you need both the Function ID and the Build ID (which you can get from the list command).
fathom intelligence function build logs <FUNCTION_ID> <BUILD_ID>
Deploying a Build
While --auto-deploy is the most common workflow, you can also deploy a previously “Successfully Built” artifact manually.
fathom intelligence function deploy <FUNCTION_ID> <BUILD_ID>
Manual deployment is useful when you want to roll back to an older, stable build without re-building the entire source.
Next Step
Once your function is successfully deployed, it is ready to handle requests.
Proceed to Interaction to learn how to call your function and monitor its runtime logs.