Documentation is published to Confluence, and found here
- Detected changes to master branch, and Bamboo build is triggered
- Bamboo will sync this repository to build repository
- When sync complete, the child plan BUILD-DOCS is triggered
- Build docs plan will construct and upload all changes to Confluence.
- Clone this repository
git clone https://github.com/openanthem/nimbus-docs.git
* https://rubyinstaller.org/downloads/
* Download and install latest version
* Make sure to select Use UTF-8 as default external encoding.
* Upon completed installation, clicking finish - allow Ruby Installed to run, select option 1 MSYS2 base installation
* Select defaults during installation of MSYS2 base\
* Documentation Source: https://rvm.io/rvm/install
* Install ruby version manager
* gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
* \curl -sSL https://get.rvm.io | bash
* rvm install ruby-2.5.0
* Documentation Source: http://asciidoctor.org/docs/install-toolchain/
---Click start, Type and search Start command prompt with Ruby
, and open.
---If newly installed, close any open terminal and reopen, changing directory back into nimbus-docs
---Type: gem install asciidoctor
* Windows and Linux: **INSTALL to $HOME/.doctoolchain
* Documentation source: https://doctoolchain.github.io/docToolchain/#_get_the_tool
* Download: https://github.com/docToolchain/docToolchain/archive/master.zip
* Extract doctoolchain to a folder, called <doctoolchain> here on out
* Download: https://github.com/hakimel/reveal.js/archive/tags/3.3.0.zip
* Extract contents reveal.js archive into <doctoolchain>\resources\reveal.js
* Download: https://github.com/asciidoctor/asciidoctor-reveal.js/archive/9667f5c.zip
* Extract contents of asciidoctor-reveal.js archive into <doctoolchain>\resources\asciidoctor-reveal.js
* Append to your workstations system path <doctoolchain>\bin
- Open a new ruby command prompt, so as to refresh shells paths.
- Change directory into the nimbus-docs repository
- Execute: scripts\generate-nimbus-documentation.sh
When the execution completed, you will find the updated documentation in nimbus-docs/builds/html5
http://asciidoctor.org/docs/user-manual/
Some notes to help build documentation later.
** If you'd like to generate local documentation for your review
Requirements:
Asciidoctor works on Linux, OS X (aka Mac OS X) and Windows.
Asciidoctor requires one of the following implementations of Ruby:
-
Ruby 1.8.7
-
Ruby 1.9.3
-
Ruby 2 (2.0.0 or better)
-
JRuby 1.7 (Ruby 1.8 and 1.9 modes)
-
JRuby 9000
-
Rubinius 2.0 (Ruby 1.8 and 1.9 modes)
-
Opal (Javascript)
For ruby, i'd recommend using Ruby Version Manager (rvm), as its available for all platforms.
Once ruby is installed, Asciidoctor can be installed through
gem install Asciidoctor
Installation can be verified with asciidoctor --version
Once Asciidoctor is installed you can continue
- Clone this respository
- Cd into cloned repositories directory
- Execute: asciidoctor -d book src/Nimbus.adoc -D build/html5/
Line 1 of any page of a book is reserved for the title, and if you're executing a macro you must begin on line 2.
For example, if the dashed lines represent the top of page.
All characters which are normally encoded with http parsers, for safety reasons, should also be coded in the page's text. This must occur because all Asciidoc pages will be converted to XHTML and uploaded to Confluence via rest api and text on a page is preserved, and as such the payload will cause the processor to exit with HTTP 400 errors, bad request.
Example:
Good: https://<USEDID>@bitbucket.anthem.com/scm/nim/petclinic-training.git Bad: https://@bitbucket.anthem.com/scm/nim/petclinic-training.git
Make sure to escape the following
Space " " " & & & < < <
> >
The above are the most often seen, however if you use keyboards other than standard 108 us layout, then you may need others. A complete list can be found.
http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
When supplying the user name and the password to the scripts/DeployNimbusDocumentation-Confluence.groovy file
You must base64 encode the credentials string of USERNAME:PASSWORD and supply that hash
Confluence library doesn't perform this for you, and the system will never authenticate or upload.
This can be performed from command line with the following command
echo -n 'USERNAME:PASSWORD' | openssl base64
Keen note that must be remembered, you must pay special attention to the rules of Asciidocs for :sects - Example you must not skip levels, either forward or backward it should be progressive.
Documentation link: http://asciidoctor.org/docs/asciidoc-writers-guide/#section-titles
Section levels cannot be chosen arbitrarily. There are two rules you must follow:
A document can only have multiple level 0 sections if the doctype is set to book.[1]
Section levels cannot be skipped when nesting sections
For example, the following syntax is illegal:
= Document Title
= Illegal Level 0 Section (violates rule #1)
== First Section
==== Illegal Nested Section (violates rule #2)
Content above the first section (after the document title) is part of the preamble. Once the first section is reached, content is associated with the section that precedes it:
== First Section
Content of first section
=== Nested Section
Content of nested section
== Second Section
Content of second section
- Clone this respository
- cd into folder
- Execute ./scripts/generate-nimbus-documentation.sh
Executing the above command will build the html files, and then upload them to the confluence page
** TODOS
- Modify the generate-nimbus-documentation.sh script to perform base64 encoding, and stuff into environment variable
- Modify the groovy script to read the base64 encoded username and password from env.
- Store the username and password as a global variable in build system. That way we do not expose critical credentials.
** AsciiDocs Cheat Sheet https://powerman.name/doc/asciidoc