feat(cli-v3): support offline build via TRIGGER_INDEX_OFFLINE + containerfile-module#20
Open
ConProgramming wants to merge 1 commit into
Open
feat(cli-v3): support offline build via TRIGGER_INDEX_OFFLINE + containerfile-module#20ConProgramming wants to merge 1 commit into
ConProgramming wants to merge 1 commit into
Conversation
…inerfile-module
Adds a documented workflow for building tasks images without calling
out to the trigger.dev API at build time, plus the necessary code paths.
Two new build-time options:
TRIGGER_INDEX_OFFLINE=1
Bypasses the live CliApiClient during indexing. Index metadata is
written to /app/index-metadata.json instead of POSTed to the deploy
endpoint. A separate process at deploy time reads the file and
submits it to the real API.
--containerfile-module=<path>
Lets operators provide a custom Containerfile generator instead of
the built-in templates. Useful for air-gapped registries, custom
base images, FIPS-compliant variants, etc.
Together these let CI builders produce a deployable tasks image with
no live API dependency at build time. See packages/cli-v3/docs/build-offline.md
for the full flow + an example pipeline.
The online path is unchanged; both flags are opt-in.
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents and stabilizes the offline-build workflow for the tasks image pipeline. Two build-time options let CI builders produce a deployable tasks image without calling the live trigger.dev API:
TRIGGER_INDEX_OFFLINE=1— bypasses the liveCliApiClientduring indexing, writesindex-metadata.jsonto the build context instead--containerfile-module=<path>— custom Containerfile generator escape hatchA separate process at deploy time (e.g. a post-install Helm Job) reads the metadata file and submits it to the real API.
Why
Needed for air-gapped CI environments (Palantir Foundry, FedRAMP/IL5 build pipelines) where the build host literally cannot reach the trigger.dev API. We've been running this internally for ~6 months; adding the docs + ensuring the code paths are intentional rather than accidental.
Per @ericallam's review feedback: "finish reverting, or land it as a documented workflow we agree to support". This PR is the "land it as a documented workflow" option.
Stability
Both flags are opt-in. Online behavior unchanged. No regression risk for current users.
Notes
./internalsubpath.packages/cli-v3/docs/build-offline.md. Happy to move if you prefer a different dir.Made with Cursor