Changes between Version 2 and Version 4 of Ticket #5335


Ignore:
Timestamp:
07/18/2017 10:45:15 PM (2 years ago)
Author:
kvas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5335

    • Property Cc ire added; iaderinokun removed
    • Property Component changed from Infrastructure to Sitescripts
  • Ticket #5335 – Description

    v2 v4  
    55  - Including SCSS from website-defaults, which we are installing locally via npm config 
    66 
     7We would like to move the building step onto a staging and/or production server. The easiest (especially in terms of deployment) way to allow this is to make CMS able to perform pre-build and post-build steps. Then website authors could indicate additional actions (i.e. shell commands) to perform before and after generation and `generate_static_pages.py` would perform those actions during the generation process. 
     8 
    79=== What to change === 
    810 
    9 We would like to move the building step onto a staging and/or production server. 
     11Introduce a configuration section into `settings.ini` of the website called `[build-steps]`. The section would have two configuration variables, each of which is interpreted as a list of strings (separated by newlines): 
    1012 
    11 ---- 
     13- `before-build` -- commands to be run before the generation takes place (in the directory where the sources of the website are located). 
     14- `after-build` -- commands to be run after the generation takes place (in the directory where the output resides). 
    1215 
    13 One way we could do this is by installing and updating npm dependencies and running gulp on staging and/or production. 
     16==== Interaction with preview ==== 
     17 
     18- Preview should run the `before-build` steps before launching the web server. 
     19 
     20==== Documentation ==== 
     21 
     22New section and options should be added to documentation. It should be emphasized that it's the responsibility of the website developers to ensure that the commands listed in the build steps are present on target production server and that they can be run by the CMS site generation server. 
     23 
     24==== Example ==== 
     25 
     26{{{ 
     27[build-steps] 
     28before-build= 
     29    python ensure_dependencies.py 
     30    npm install 
     31    gulp scss 
     32after-build= html-prettify -r * 
     33}}}