Skip to content
Snippets Groups Projects
Commit 79a3c47d authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "docs: add variable for current branch"

parents 0adf7f99 c9cc6f40
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,28 @@ ...@@ -26,6 +26,28 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import openstackdocstheme
# -- Kayobe configuration --------------------------------------
# Variables to override
# Smart variable replacements with what we can. The openstackdocstheme has
# no stable interface though. This works with 1.20.
current_series = openstackdocstheme.ext._get_series_name()
if current_series == "latest":
branch = "master"
else:
branch = "stable/{}".format(current_series)
# Substitutions loader
rst_epilog = """
.. |current_release_git_branch_name| replace:: {current_release_git_branch_name}
""".format( # noqa: E501
current_release_git_branch_name=branch,
)
# -- General configuration ---------------------------------------------------- # -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
......
...@@ -21,12 +21,12 @@ Configuration ...@@ -21,12 +21,12 @@ Configuration
Clone the `kayobe-config <https://opendev.org/openstack/kayobe-config>`_ Clone the `kayobe-config <https://opendev.org/openstack/kayobe-config>`_
git repository, using the correct branch for the release you are deploying. In git repository, using the correct branch for the release you are deploying. In
this example we will use the ``master`` branch. this example we will use the |current_release_git_branch_name| branch.
.. code-block:: console .. parsed-literal::
cd <base path>/src cd <base path>/src
git clone https://opendev.org/openstack/kayobe-config -b master git clone \https://opendev.org/openstack/kayobe-config.git -b |current_release_git_branch_name|
cd kayobe-config cd kayobe-config
This repository is bare, and needs to be populated. The repository includes an This repository is bare, and needs to be populated. The repository includes an
......
...@@ -42,18 +42,22 @@ Overcloud ...@@ -42,18 +42,22 @@ Overcloud
Preparation Preparation
----------- -----------
Clone the Kayobe repository:: Clone the Kayobe repository:
git clone https://opendev.org/openstack/kayobe.git .. parsed-literal::
git clone \https://opendev.org/openstack/kayobe.git -b |current_release_git_branch_name|
Change the current directory to the Kayobe repository:: Change the current directory to the Kayobe repository::
cd kayobe cd kayobe
Clone the ``kayobe-config-dev`` repository to ``config/src/kayobe-config``:: Clone the ``kayobe-config-dev`` repository to ``config/src/kayobe-config``
.. parsed-literal::
mkdir -p config/src mkdir -p config/src
git clone https://opendev.org/openstack/kayobe-config-dev.git config/src/kayobe-config git clone \https://opendev.org/openstack/kayobe-config-dev.git config/src/kayobe-config -b |current_release_git_branch_name|
Inspect the Kayobe configuration and make any changes necessary for your Inspect the Kayobe configuration and make any changes necessary for your
environment. environment.
...@@ -187,18 +191,22 @@ VM. ...@@ -187,18 +191,22 @@ VM.
Preparation Preparation
----------- -----------
Clone the Kayobe repository:: Clone the Kayobe repository:
git clone https://opendev.org/openstack/kayobe.git .. parsed-literal::
git clone \https://opendev.org/openstack/kayobe.git -b |current_release_git_branch_name|
Change to the ``kayobe`` directory:: Change to the ``kayobe`` directory::
cd kayobe cd kayobe
Clone the ``kayobe-config-dev`` repository to ``config/src/kayobe-config``:: Clone the ``kayobe-config-dev`` repository to ``config/src/kayobe-config``:
.. parsed-literal::
mkdir -p config/src mkdir -p config/src
git clone https://opendev.org/openstack/kayobe-config-dev.git config/src/kayobe-config git clone \https://opendev.org/openstack/kayobe-config-dev.git config/src/kayobe-config -b |current_release_git_branch_name|
Inspect the Kayobe configuration and make any changes necessary for your Inspect the Kayobe configuration and make any changes necessary for your
environment. environment.
......
...@@ -44,12 +44,14 @@ Running Unit Tests Locally ...@@ -44,12 +44,14 @@ Running Unit Tests Locally
========================== ==========================
If you haven't already, the kayobe source code should be pulled directly from If you haven't already, the kayobe source code should be pulled directly from
git:: git:
# from your home or source directory .. parsed-literal::
cd ~
git clone https://opendev.org/openstack/kayobe.git # from your home or source directory
cd kayobe cd ~
git clone \https://opendev.org/openstack/kayobe.git -b |current_release_git_branch_name|
cd kayobe
Running Unit and Style Tests Running Unit and Style Tests
---------------------------- ----------------------------
......
...@@ -37,9 +37,11 @@ Later sections in the development guide cover in more detail how to use the ...@@ -37,9 +37,11 @@ Later sections in the development guide cover in more detail how to use the
development VM in different configurations. These steps cover bringing up and development VM in different configurations. These steps cover bringing up and
accessing the VM. accessing the VM.
Clone the kayobe repository:: Clone the kayobe repository:
git clone https://opendev.org/openstack/kayobe.git .. parsed-literal::
git clone \https://opendev.org/openstack/kayobe.git -b |current_release_git_branch_name|
Change the current directory to the kayobe repository:: Change the current directory to the kayobe repository::
......
...@@ -127,10 +127,12 @@ code repositories and python virtual environments:: ...@@ -127,10 +127,12 @@ code repositories and python virtual environments::
$ cd <base_path> $ cd <base_path>
$ mkdir -p src venvs $ mkdir -p src venvs
Next, obtain the Kayobe source code. For example:: Next, obtain the Kayobe source code. For example:
$ cd <base_path>/src .. parsed-literal::
$ git clone https://opendev.org/openstack/kayobe.git
$ cd <base_path>/src
$ git clone \https://opendev.org/openstack/kayobe.git -b |current_release_git_branch_name|
Create a virtualenv for Kayobe:: Create a virtualenv for Kayobe::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment