Publishing a release¶
xratu publish turns a baked block into a release: a published, immutable
version that projects in the organization can import. It reads the block's
xratufile, sends the control plane the release metadata, and uploads the
package archive to your artifact registry.
What happens¶
The control plane authorizes the publish and records the release from its metadata. The package archive goes from the CLI straight to your organization's artifact registry, using a short-lived credential your own data plane obtains from your cloud provider:
sequenceDiagram
participant CLI as xratu publish
participant CP as Control plane
participant DP as Your data plane
participant REG as Your artifact registry
CLI->>CP: release metadata: archive digests, capsule documents
Note over CP: checks the release, signs the capsule's attestation
DP->>CP: pulls the publication assignment
Note over DP: obtains an ASPTC from your cloud provider
DP->>CP: credential, encrypted to the CLI's session key
CP->>CLI: encrypted credential
CLI->>REG: package archive
DP->>REG: verifies the upload, writes the release artifact
DP->>CP: publication result
Note over CP: release marked published
- The CLI checks the release locally. It re-validates the capsule documents
in the
xratufileagainst the archive's file hashes, then sends the metadata. See Capsule release records. - The control plane admits it and signs. It checks the archive's SHA-256
against the
xratufile, admits the capsule record, stores the block manifest, and signs a publication attestation over the capsule's digests. See Publication attestation and signing. - Your data plane obtains the upload credential. It requests an ASPTC from your cloud provider, scoped to this one upload, and encrypts it to the CLI's session key. See ASPTC.
- The CLI uploads the archive directly to your artifact registry.
- Your data plane finalizes the release. It verifies the upload and writes
the release artifact, and the control plane marks the release
published. See Artifact registry and blob references.
What publish writes back¶
When publish succeeds, the CLI adds a publish and a package section to the
block's xratufile, recording the release it created.
When publish is refused¶
| Error | Cause | Fix |
|---|---|---|
xratufile carries no capsules; re-bake this project before publishing |
The build record has no capsule | Run xratu bake again |
artifact archive sha256 mismatch with xratufile (expected=… actual=…) |
The archive differs from the one bake recorded | Bake again, and publish the archive it writes |
capsule release is not valid: capsules[0] immutable file tree must exactly match the archive |
The capsule and the archive describe different files | Bake again |
See Published artifact catalog for the release record the control plane keeps.