<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14114</bug_id>
          
          <creation_ts>2020-11-04 14:16:15 +0000</creation_ts>
          <short_desc>Implement proper sphinx docs publishing</short_desc>
          <delta_ts>2021-04-01 15:38:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>General Docs</product>
          <component>docs-general</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nicolas Dechesne">ndec13</reporter>
          <assigned_to name="Nicolas Dechesne">ndec13</assigned_to>
          <cc>akuster808</cc>
    
    <cc>mhalstead</cc>
    
    <cc>ndec13</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88547</commentid>
    <comment_count>0</comment_count>
    <who name="Nicolas Dechesne">ndec13</who>
    <bug_when>2020-11-04 14:16:15 +0000</bug_when>
    <thetext>now that we moved to Sphinx, and that we have a docs website, we need to implement how to properly publish all docs. It is not as simple as one would believe!

Let&apos;s list what &apos;docs&apos; we produce:

1. for yocto-docs
1.a. &apos;docs&apos; for master branch
1.b. &apos;docs&apos; for gatesgarth branch
1.c. &apos;docs&apos; for hardknott branch (eventually)
1.d. &apos;docs&apos; for the transition branch, which produces a &apos;wrapper&apos; around the docbook docs for all previous releases (0.9-&gt;3.1.3 as of today)

2. for bitbake
2.a. &apos;docs&apos; for master branch
2.b. &apos;docs&apos; for 1.48 branch
2.c. &apos;docs&apos; for 1.50 branch (eventually)

We use the intersphinx extension to link yocto-docs and bitbake docs together, so in the yocto-docs conf.py file, we have a config variable that links to the location of the bitbake doc, e.g
intersphinx_mapping = {
    &apos;bitbake&apos;: (&apos;https://docs.yoctoproject.org/bitbake/&apos;, None)
}

That means we need to update conf.py for each yocto-docs branch accordingly.

It&apos;s nice and simple, and all of that can be done in CI/CD style automatically. 

We end up with something like that on the docs server:


    folder on website       | git branch   | intersphinx in conf.py         | Notes
----------------------------|--------------|--------------------------------|-----------------
|-- index.html              | master       | docs.yp.org/bitbake            |
|                           |              |                                |
|-- 0.9                     |              |                                |
|   |-- index.html          | transition   |                                |
|   `-- */*.html            | .            |                                | Docbook files
|-- ...                     | .            |                                |
|   |-- index.html          | transition   |                                |
|   `-- */*.html            | .            |                                | Docbook files
|-- ...                     | .            |                                |
|   |-- index.html          | transition   |                                |
|   `-- */*.html            | .            |                                | Docbook files
|-- 3.1                     |              |                                |
|   |-- index.html          | transition   |                                |
|   `-- */*.html            | .            |                                | Docbook files
|                           |              |                                |
|-- gatesgarth              |              |                                |
|   `-- index.html          | gatesgarth   | docs.yp.org/bitbake/1.48       |
|-- hardknott               |              |                                |
|   `-- index.html          | hardknott    | docs.yp.org/bitbake/1.50       |
|                           |              |                                |
|-- bitbake                 |              |                                |
|   |-- index.html          | master       |                                |
|   |-- 1.48                |              |                                |
|   |   `-- index.html      | 1.48         |                                |
|   |-- 1.50                |              |                                |
|   |   `-- index.html      | 1.50         |                                |
|   |                       |              |                                |


in CI/CD , we monitor each branch, and whenever there is a change, we rebuild and push at the right location.

Note that up until now, we were not publishing docs from &apos;branches&apos;, but only for releases, so that&apos;s a great improvement.

Now we want to publish docs for releases as well, and that&apos;s when the problems come!

* How do we create the &lt;3.2&gt; &apos;docs&apos; release?
* What is the intersphinx config in that case? It&apos;s not simple &quot;cp -a ./gatesgarth/* ./3.2&quot; since we need to copy the bitbake docs as well, *and* we need to update all links from yocto-docs which point to bitbake!

We basically need to these folders on the server:

|
|-- 3.2                     |              |                                | How do we make a &apos;doc&apos; release. It&apos;s not a simple &apos;copy&apos;
|   `-- index.html          | XXX          | docs.yp.org/bitbake/&lt;REL 3.2&gt;  | Since there are links to bitbake which need to be updated.
|-- 3.3                     | XXX          | docs.yp.org/bitbake/&lt;REL 3.2&gt;  |
|   `-- index.html          |              |                                |
|                           |              |                                |
|-- bitbake                 |              |                                |
|   |                       |              |                                |
|   |-- XXX                 |              |                                | YP release 3.2 docs.
|   |   `-- index.html      |              |                                |
|   |                       |              |                                |
|   |-- XXX                 |              |                                | YP release 3.3 docs.
|   |   `-- index.html      |              |                                |</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88594</commentid>
    <comment_count>1</comment_count>
    <who name="Nicolas Dechesne">ndec13</who>
    <bug_when>2020-11-12 13:54:22 +0000</bug_when>
    <thetext>a new builder in the AB was defined which monitors the yocto-docs and bitbake branches, and build/publish to the docs website. 

docs.yp.org is then fully generated from https://autobuilder.yoctoproject.org/typhoon/#/builders/114

this takes care of building all &apos;branches&apos;.

we now need a mechanism/script to publish a &apos;release or tag&apos; (e.g. docs.yp.org/3.2)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88775</commentid>
    <comment_count>2</comment_count>
    <who name="Nicolas Dechesne">ndec13</who>
    <bug_when>2020-12-15 07:42:05 +0000</bug_when>
    <thetext>I believe we could close this one. the only thing missing really is a tool or script (or set of instructions) to create a doc release, but the bulk of what this bug was about is now properly implemented and automated in the AB. 

If we close this one, I can create another one to track the &apos;docs release process&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88931</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-01-14 16:03:25 +0000</bug_when>
    <thetext>Yes please close this one this week and create the other bug. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88981</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-01-21 16:04:08 +0000</bug_when>
    <thetext>Nico, ping?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89851</commentid>
    <comment_count>5</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2021-04-01 14:58:48 +0000</bug_when>
    <thetext>isn&apos;t this done?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89855</commentid>
    <comment_count>6</comment_count>
    <who name="Nicolas Dechesne">ndec13</who>
    <bug_when>2021-04-01 15:38:42 +0000</bug_when>
    <thetext>the publishing of the yp docs web site is implemented in the AB. We can close this bug. there are further enhancements we want to make, but we can open bugs for them as needed!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>