Commit Graph

5 Commits

Author SHA1 Message Date
2a8d56e17e container-build: Use bash for ExecCondition
Since `sh` may point to a POSIX shell, and brace expansion is undefined there.
2023-12-30 18:39:26 +00:00
ab12d60d31 Tag existing images with previous on re-build
Container builds using the `container-build@` systemd service will
generally tag any container image built with the `latest` tag, which is
then referred to pervasively in container executions.

However, this tag is overwritten when building new images, and, combined
with how `podman auto-update` will prune old image digests, may cause us
to lack the ability to roll back, automatically or otherwise.

This commit sets a `previous` tag on container re-builds, which should
only generally happen when source files change (due to the `ExecCondition`)
present on the service, which in turn should ensure that images are not
spuriously tagged as such.
2023-12-22 19:27:40 +00:00
d8a4b7874f Skip container builds unless local files changed
This commit adds an `ExecCondition` directive on the `container-build@`
service, used as a pre-requisite for all other Podman-based services,
skipping `podman build` invocations unless local `Containerfile` or any
files in the `container` sub-directories have changed.

Container builds are responsible for the majority of time taken during
boot, even with cache in place; this will help alleviate pressure and
hopefully speed up boot considerably.
2023-12-20 19:50:39 +00:00
48abe1c3db Improve virtual environment
Virtual environments now re-use names, to prevent accumulation of older
environments when updating versions.
2022-10-13 18:59:57 +01:00
f877a72e83 Flatten directory structures
This commit contains a fairly large diff for a fairly small change:
moving the `config/common` directory to `host/base` to better reflect
its intended use, and promoting `config/service` to the root directory.

These changes unlock some improvements in `coreos-home-server-update`
processes, which will (assuming `/etc/coreos-home-server/base` exists)
keep host-wide systemd services in sync in addition to service-specific
ones.

Changes have been make to the `Makefile` and a few other places where
`config/common` was referenced, but most of this work is renames that
are not intended to break compatibility with new or running servers.
2022-01-15 11:43:33 +00:00