redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

`build` command is problamatic #141

Closed gaurav-nelson closed 4 years ago

gaurav-nelson commented 6 years ago

For OpenShift Docs we have the command bundle exec rake build specified in .travis.yaml file. But Travis logs shows that it is building only for a single distro (Openshift Origin) and not others.

Log snippets

NOTE: We have only one welcome/index.adoc file.

Lines 543 - 559 https://travis-ci.org/openshift/openshift-docs/jobs/362423635#L543

$ bundle exec rake build
Building all distributions.
WARN: The following branches do not exist in your local git repo:
- enterprise-3.0
- enterprise-3.1
- enterprise-3.2
- enterprise-3.3
- enterprise-3.4
- enterprise-3.5
- enterprise-3.6
- enterprise-3.7
- enterprise-3.9
The build will proceed but these branches will not be generated.
WARN: The _topic_map.yml file on branch '(HEAD detached at FETCH_HEAD)' references 4 nonexistent topics. Set logging to 'debug' for details.
WARN: Branch (HEAD detached at FETCH_HEAD) includes 140 files that are not referenced in the _topic_map.yml file. Set logging to 'debug' for details.
Building OpenShift Origin for branch '(HEAD detached at FETCH_HEAD)'
INFO:   - welcome/index.adoc

Lines 1046 -1048 (Starts building again no distro information visible) https://travis-ci.org/openshift/openshift-docs/jobs/362423635#L1046

INFO:   - rest_api/oapi/v1.UserIdentityMapping.adoc
INFO:   - welcome/index.adoc
INFO:   - welcome/legal_notice.adoc

Lines 1343 -1346 (Starts building again no distro information visible) https://travis-ci.org/openshift/openshift-docs/jobs/362423635#L1847

INFO:   - rest_api/oapi/v1.UserIdentityMapping.adoc
INFO:   - welcome/index.adoc
INFO:   - welcome/legal_notice.adoc
INFO:   - welcome/revhistory_full.adoc

Lines 2389 - 2396 (Starts building for master branch) https://travis-ci.org/openshift/openshift-docs/jobs/362423635#L2389

Stashing uncommited changes and files in working branch.
CHANGING TO BRANCH 'master'
WARN: The _topic_map.yml file on branch 'master' references 4 nonexistent topics. Set logging to 'debug' for details.
WARN: Branch master includes 116 files that are not referenced in the _topic_map.yml file. Set logging to 'debug' for details.
Building OpenShift Origin for branch 'master'
INFO:   - welcome/index.adoc
INFO:   - welcome/legal_notice.adoc
INFO:   - whats_new/index.adoc
gaurav-nelson commented 6 years ago

Checking this again locally, I can see that it builds for all distros. However it will be helpful if logs show entries for all distros as it builds. something like:

WARN: Branch master includes 116 files that are not referenced in the _topic_map.yml file. Set logging to 'debug' for details.
Building OpenShift Origin for branch 'master'
INFO:   - welcome/index.adoc
...
...
WARN: Branch master includes 116 files that are not referenced in the _topic_map.yml file. Set logging to 'debug' for details.
Building OpenShift Enterprise for branch 'master'
INFO:   - welcome/index.adoc
...
...
gaurav-nelson commented 6 years ago

Found another issue while checking the build files and logs. Asciibinder starts building for all branches.

  1. For a PR it first builds for (head detached at fetch_head) branch, and then
  2. Builds it again for the master branch

What this does is, that it replaces all the contents on the previous build, and we get a build of master branch which we do not want, we want the build files for (head detached at fetch_head) branch.