Publishing
During development, the implementation builds from the local directory:
runtime: type: container build: context: ./workerThat is not publishable — whoever consumes it needs the finished image, not the
source. A CI job does not have your directory either, so oren generate refuses
implementations like this.
Publishing
Section titled “Publishing”docker build -t ghcr.io/youraccount/oren-my-task-alpine:1.0.0 worker/docker push ghcr.io/youraccount/oren-my-task-alpine:1.0.0runtime: type: container image: ghcr.io/youraccount/oren-my-task-alpine:1.0.0oren install # resolves the tag to a digestWith the image up, the contract goes to the catalogue:
oren publish .The name carries the engineering choice
Section titled “The name carries the engineering choice”The repository should reflect the implementation, not the task:
oren-build-docker-image-kanikooren-push-docker-image-skopeooren-analyze-commits-alpineThe suffix makes it evident that this is one way of satisfying the contract.
Someone publishes -buildkit and the two coexist in the catalogue, comparable
by the privilege they require. Named after the task, it would look like the
implementation.
One image can serve several tasks
Section titled “One image can serve several tasks”terraform-plan and terraform-apply are different contracts — different
effects, outputs and dependencies — but use the same binary. Both
implementations point at the same image and pick the script by entrypoint:
runtime: image: ghcr.io/acme/oren-terraform-hashicorp:1.0.0 entrypoint: ["/worker/plan.sh"]A subcommand is an entrypoint, and the implementation is what chooses it —
not an input of the contract. Merging the two into one contract with a command
field would force declaring the worst case in effects, losing the information
that planning is safe to repeat.
A published version is immutable
Section titled “A published version is immutable”Republishing a version with different content breaks whoever depends on it, with no signal — and silently transfers the access authorisation someone granted to the previous version.
To publish again, bump the implementation’s version.