fix(ci) Ship the compiled contract in the deploy tarball #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ship-built-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Since #13,
stagefails in two independent ways once it leaves CI:ERR_MODULE_NOT_FOUND …/api-contract/src/auth.js). Fixed on the contract side in recipe-platformbuild-contract-for-node, which now compiles todist/and points Node at it.build_stage.yamlandbuild_release.yamlshipnode_modules/in the tarball, butnode_modules/@recipe/contractis a symlink to../recipe-platform/api-contract, which does not exist on the target host.Tests and
tscpass in both cases, so CI never caught either one.Change
build_stage.yamlandbuild_release.yaml: aftermv node_modules build, the symlink is replaced with a real copy of the contract'spackage.jsonand compileddist/.CLAUDE.md: documents that Node loads the contract'sdist/, and thatnpm run buildin../recipe-platform/api-contractis needed after contract changes.Verification
I ran the stage pipeline steps locally on fresh copies of both repos:
npm install, which buildsdist/viapreparenpm ci, 366/366 tests,npm run buildtarThen I unpacked the tarball in a directory with no
recipe-platformnext to it and bootednode index.jsagainst the dev DB. The server started and/healthreturnedUP.Merge order
The recipe-platform PR
build-contract-for-nodemust be merged tomainfirst. This workflow clones platformmain, and withoutdist/the copy step fails.🤖 Generated with Claude Code