Bug 1011904 - RFE: Support multiple config files
Summary: RFE: Support multiple config files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core
Version: 1.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 1.2
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On: 979247
Blocks: 1012194 1013825
TreeView+ depends on / blocked
 
Reported: 2013-09-25 11:14 UTC by Ruediger Landmann
Modified: 2013-10-17 23:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 23:49:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Ruediger Landmann 2013-09-25 11:14:13 UTC
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:
100%

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-14 01:11:19 UTC
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)

Building:

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".

UI:

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-15 03:21:06 UTC
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-16 02:04:32 UTC
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-16 03:30:29 UTC
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-16 03:30:50 UTC
The above was tested with 

CSProcessor client version: 1.2-SNAPSHOT, Build 20131016-1033

Comment 9 Matthew Casperson 2013-10-16 03:33:03 UTC
Ignore the above comments - my version of csprocessor was not updated.

Comment 10 Matthew Casperson 2013-10-16 05:42:12 UTC
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.