Bug 1011904 - RFE: Support multiple config files
RFE: Support multiple config files
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: ---
: 1.2
Assigned To: Lee Newson
Depends On: 979247
Blocks: 1012194 1013825
  Show dependency treegraph
Reported: 2013-09-25 07:14 EDT by Ruediger Landmann
Modified: 2013-10-17 19:49 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 19:49:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ruediger Landmann 2013-09-25 07:14:13 EDT
Description of problem: The topic maps currently provide a mechanism to specify parameters for the Publican config file. However, for a long time now, Publican has supported multiple config files. Platform documentation makes very heavy use of this functionality, using different config files to create the Beta and GA versions of docs; and in one case to create different books from the same set of XML files. 

Version-Release number of selected component (if applicable):
Current prod

How reproducible:

Steps to Reproduce:
1. Try to specify more than one config file

Actual results:
Discover that you can't

Expected results:
Treat additional config files like the main publican.cfg file. Or allow config files to be supplied separately instead of autogenerating them.

Additional info:
Workaround is to maintain separate near-identical topic maps for each book in each of its release phases.
Comment 4 Lee Newson 2013-10-13 21:11:19 EDT
Added in 1.2-SNAPSHOT build 201310111650

Content Spec:

We've added two new metadata elements for content specs.

The first is for adding the additional publican.cfg metadata, which is specified in the format "<NAME>-publican.cfg = [<CONTENT>]". eg

publican.cfg = [git_branch: rhel-6-docs
beta-publican.cfg = [condition: beta
git_branch: rhel-6-docs]

Then there is also the "Default publican.cfg = <NAME>" metadata, which is used to specify which file to use by default when building (to save having to specify it every time you want to build). (Note: The value can either be just <NAME> or <NAME>-publican.cfg)


For assembling we've added the  "--publican-config <NAME>" option in the CLI to specify to build with something other than the "Default publican.cfg" file. eg "--publican-config beta" or "--publican-config beta-publican.cfg". For the additional publican.cfg files the following will still be set/overridden when building: "brand", "xml_lang" and "type". "docname", "product" and "version" will also be added to the additional configs if they aren't set by the user. I should also mention that all config files will be included in the build no matter what value is set for "Default publican.cfg".


In the UI we've also made these fields collapsible so that they don't hinder readability too much for extremely long configs.
Comment 5 Matthew Casperson 2013-10-14 23:21:06 EDT
Tested adding new publican.cfg files to the specs, and tested collapsing them in the UI.

csprocessor preview does not seem to respect the "Default publican.cfg" setting though.
Comment 6 Lee Newson 2013-10-15 22:04:32 EDT
Fixed in 1.2-SNAPSHOT build 201310161156

The assemble (and therefore the preview) command wasn't using the Default publican.cfg value at all due to an issue where the command line arg was always being used. This has been updated so that the command line arg will override the content spec value, but only when specified.
Comment 7 Matthew Casperson 2013-10-15 23:30:29 EDT
This still does not appear to work. With the settings

  JBoss-publican.cfg = [xml_lang: "en-US"
  brand: JBoss
  type: Book
  chunk_first: 1
  formats: html,html-single,pdf
  show_remarks: 1]
  Default publican.cfg = JBoss

and the command

  csprocessor preview 13968 -y

the final output does not display any remarks.
Comment 8 Matthew Casperson 2013-10-15 23:30:50 EDT
The above was tested with 

CSProcessor client version: 1.2-SNAPSHOT, Build 20131016-1033
Comment 9 Matthew Casperson 2013-10-15 23:33:03 EDT
Ignore the above comments - my version of csprocessor was not updated.
Comment 10 Matthew Casperson 2013-10-16 01:42:12 EDT
csprocessor assemble now respects the Default publican.cfg directive.

Note You need to log in before you can comment on or make changes to this bug.