From 5ae5cdbf9ef1df0c728e71a5387d13e4bee1f2fe Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Thu, 18 Feb 2021 23:27:06 +0000 Subject: [PATCH] docs/news: describe addition to the weldr API The compose endpoint gained a new `url` parameter for building ostree-based images. Signed-off-by: Tom Gundersen --- docs/news/unreleased/weldr-ostree-url.md | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/news/unreleased/weldr-ostree-url.md diff --git a/docs/news/unreleased/weldr-ostree-url.md b/docs/news/unreleased/weldr-ostree-url.md new file mode 100644 index 000000000..5bbc7ad50 --- /dev/null +++ b/docs/news/unreleased/weldr-ostree-url.md @@ -0,0 +1,40 @@ +# Weldr API: Allow parent OSTree commit to be read from repository + +The weldr API for building OSTree based images is extended to optionally take an `url` parameter instead of the current `parent`. + +The `parent` parameter contains the OSTree commit SHA of the parent commit when building an update commit. Obtaining this is cumbersome, so instead the `url` of the repository containing the desired parent commit can be specified. In this case, composer will take the current `HEAD` of the given `ref` as the parent. + +At most one of `parent` and `url` can be specified in a given compose request. + +Before: + + curl --silent \ + --header "Content-Type: application/json" \ + --unix-socket /run/weldr/api.socket \ + http://localhost/api/v1/compose \ + --data "{ \ + \"blueprint_name\": \"foo\", \ + \"compose_type\": \"rhel-edge-commit\", \ + \"ostree\": {\ \ + \"parent\": \"b8a69e5c79be5830bb272356809a52b1660d2013c26f6973d549d0a312a8d21a\", \ + \"ref\": \"fedora/stable/x86_64/iot\" \ + } \ + }" + +After: + + curl --silent \ + --header "Content-Type: application/json" \ + --unix-socket /run/weldr/api.socket \ + http://localhost/api/v1/compose \ + --data "{ \ + \"blueprint_name\": \"foo\", \ + \"compose_type\": \"rhel-edge-commit\", \ + \"ostree\": {\ \ + \"url\": \"https://d2ju0wfl996cmc.cloudfront.net/\", \ + \"ref\": \"fedora/stable/x86_64/iot\" \ + } \ + }" + +Relevant PRs: +https://github.com/osbuild/osbuild-composer/pull/1235