debian-forge-composer/internal/weldr
Ondřej Budai 08c5eaf6a6 store disk artifacts per image build instead of per compose
In #221 Compose was refactored: Now it can have multiple image builds. More
image builds result in more jobs. Each job has its own result (logs from
osbuild). Additionally, also targets are now a part of image build. With
local target this effectively means we can have multiple images per compose.

However, these artifacts (images & results) were stored only per compose
prior this commit, thus rendering the behaviour of composes with multiple
image builds undefined and racy.

This commit fixes it by storing all the artifacts per image build instead of
per compose. To achieve this feature, getComposeDirectory and
getImageBuildDirectory methods were created to centralize the path assembly.

Paths to artifacts prior this commit:
${COMPOSER_STATE_DIR}/outputs/${COMPOSE_ID}/*

Paths to artifacts after this commit:
${COMPOSER_STATE_DIR}/outputs/${COMPOSE_ID}/${IMAGE_BUILD_ID}/*
2020-02-14 11:53:38 +01:00
..
api.go store disk artifacts per image build instead of per compose 2020-02-14 11:53:38 +01:00
api_test.go weldr: add filtering to compose route 2020-02-12 19:23:40 +01:00
compose.go weldr: clean up the image size code 2020-02-14 11:53:38 +01:00
upload.go Weldr API: use the new compose/store API 2020-02-12 11:17:26 +01:00
util.go composer/job-queue: add scaffolding for the job queue API 2019-09-26 19:53:06 +02:00