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}/* |
||
|---|---|---|
| .. | ||
| api.go | ||
| api_test.go | ||
| compose.go | ||
| upload.go | ||
| util.go | ||