Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task]: remove static assets from docker image #15233

Open
1 task
KevinMind opened this issue Dec 10, 2024 · 2 comments
Open
1 task

[Task]: remove static assets from docker image #15233

KevinMind opened this issue Dec 10, 2024 · 2 comments
Labels
needs:info repository:addons-server Issue relating to addons-server

Comments

@KevinMind
Copy link
Contributor

KevinMind commented Dec 10, 2024

Description

Currently we use a static assets stage in our docker image build to generate static assets required for addons-server. These are copied into the final production stage and pushed along with the image. During deployments, we pull the image, extract these files and upload them to GCP bucket for use in production.

This is several round trips and a lot of image bloat for no real benefit. We build our image during the ci.yml when we publish a new release. Here is where we build the image and that is where we can upload the assets.

Then the deployment job can access the static assets independently of the image, or even remove the need to uplaod at all if we upload directly. Need to coordinate with @bqbn on the structure of our bucket and what is possible in terms of uploading assets. Two possible options:

  • upload assets to github asset storage (accessible by url embedded in the workflow run json) and let the deployment job download and reupload to gcp
  • upload assets directly to gcp and deployment does nothing with assets

Acceptance Criteria

Milestones/checkpoints

Preview Give feedback

Checks

  • If I have identified that the work is specific to a repository, I have removed "repository:addons-server" or "repository:addons-frontend"

┆Issue is synchronized with this Jira Task

@KevinMind KevinMind added needs:info repository:addons-server Issue relating to addons-server labels Dec 10, 2024
@bqbn
Copy link
Contributor

bqbn commented Dec 10, 2024

@bqbn
Copy link
Contributor

bqbn commented Dec 10, 2024

If we plan to upload static assets to GCS buckets at build time, I'm wondering if it's feasible to upload them to a subfolder unique to each build. For instance, when we publish a release like YYYY.MM.DD-N, the static assets could be uploaded to a subfolder named YYYY.MM.DD-N. However, the dev environment should be handled differently. In the dev environment, the static assets could either be uploaded to a common subfolder or to one that represents its short commit number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:info repository:addons-server Issue relating to addons-server
Projects
None yet
Development

No branches or pull requests

2 participants