Project

General

Profile

Feature #8925

Load plugin asset manifests from Foreman root directory

Added by Dominic Cleal over 4 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugins-Engines
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

While implementing plugin asset precompilation in Debian packages with the existing split-manifest support (https://github.com/theforeman/foreman/blob/1.7.1/config/environments/production.rb#L125-L147) it became apparent that we couldn't package the precompiled assets+manifest inside the gem installation directory as bundler manages that. If we put the assets in that location, bundler/rubygems would delete it.

e.g.

drwxr-xr-x root/root         0 2015-01-13 12:48 ./usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_docker-1.0.0/
drwxr-xr-x root/root         0 2015-01-13 12:48 ./usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_docker-1.0.0/public/
drwxr-xr-x root/root         0 2015-01-13 12:53 ./usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_docker-1.0.0/public/assets/
drwxr-xr-x root/root         0 2015-01-13 12:53 ./usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_docker-1.0.0/public/assets/foreman_docker/
-rw-r--r-- root/root       102 2015-01-13 12:53 ./usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_docker-1.0.0/public/assets/foreman_docker/autocomplete-1e6e8602603162b4b019d664dd3a9b62.css

Instead, Foreman core needs to support a different location to load the asset manifests from that is outside of the plugin installation directory. This can be the main Foreman assets directory (~foreman/public/assets/) and since assets are all in a subdir per plugin, they won't clash.

Associated revisions

Revision d43379f3 (diff)
Added by Dominic Cleal over 4 years ago

fixes #8925 - support plugin asset manifests beneath app root

This supports Debian packaging where storing the assets manifest.yml beneath
the gem installation directory isn't possible, as bundler manages gem
installations.

Instead, support loading ${app.root}/public/assets/${plugin}/manifest.yml so
plugin manifests can be packaged under the main Foreman root.

Revision 58ab4598 (diff)
Added by Dominic Cleal over 4 years ago

fixes #8925 - support plugin asset manifests beneath app root

This supports Debian packaging where storing the assets manifest.yml beneath
the gem installation directory isn't possible, as bundler manages gem
installations.

Instead, support loading ${app.root}/public/assets/${plugin}/manifest.yml so
plugin manifests can be packaged under the main Foreman root.

(cherry picked from commit d43379f323c507d19a2e8f051cd2e767be84125e)

History

#1 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2077 added
  • Pull request deleted ()

#2 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 30

#3 Updated by Dominic Cleal over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF