[58431] Restore images in all-in-one docker container #16973
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket
https://community.openproject.org/wp/58431
What are you trying to accomplish?
Restore asset images on docker all-in-one container.
We can't do much for docker images existing having already this issue (from openproject/openproject:14.5.0 to 14.6.1).
Screenshots
Images missing:
What approach did you choose and why?
Images are precompiled and when they are served, there is a translation from the image name to its actual path. For instance
asset_path("logo_openproject_white_big.png")
=>assets/logo_openproject_white_big-2c6d79fa03613154cf6bd67c622dbae5b93ed3199e0e7332d96b6f8ec21f85a1.png
.Translation is done with the
public/assets/.sprockets-manifest-*.json
file which tracks the mapping between the asset file name and its actual path.To build the docker images for all architectures, the assets are precompiled once for all architectures, uploaded as a GitHub artifact, and then downloaded for each architecture when building the images.
The files are uploaded with the
actions/upload-artifact
action, but hidden files are excluded by default since v4.4. That's why the file is missing and the images from sprockets pipeline are not correctly served.This PR restores the images by explicitly adding
public/assets/.sprockets-manifest-*.json
to the assets files artifact.This issue does not affect flavor builds because the assets are compiled during the docker build (no upload/download excluding hidden files)
Merge checklist