README.md 2.98 KB
Newer Older
Silvia Almagia's avatar
Silvia Almagia committed

This respository contains the documentation of OpenCAPIF.
Silvia Almagia's avatar
Silvia Almagia committed

Silvia Almagia's avatar
Silvia Almagia committed

There are 2 ways to upgrade documentation published on [OCF Documentation]:
* Push any change on **develop** branch will force update of **develop** version on [OCF Documentation].
* Create a tag, this will create a version with tag name on [OCF Documentation].
Silvia Almagia's avatar
Silvia Almagia committed

Silvia Almagia's avatar
Silvia Almagia committed

This documentation repository has 2 protected branches:
Silvia Almagia's avatar
Silvia Almagia committed

* **main**
  * This branch will store the information stable.
* **develop**
  * Any change uploaded on this branch will upgrade **develop** version on documentation published on [OCF Documentation]
Silvia Almagia's avatar
Silvia Almagia committed

## What should be the flow to add documentation during development
Silvia Almagia's avatar
Silvia Almagia committed

The steps to upgrade documentation are:
1. Perform the development of functionality on capif code respository.
2. Create an issue on [Documentation Gitlab](https://labs.etsi.org/rep/ocf/documentation/-/issues)
3. Create new branch with source from **develop**.
4. Update documentation.
5. Check if all new documentation is ok using **mike** [Checking documentation with local deployment](#checking-documentation-with-local-deployment) section.
6. Push changes to branch.
7. Create Merge Request.
8. Send Merge Request to one TSC Member to approve it.
Silvia Almagia's avatar
Silvia Almagia committed

## Release new version of documentation
Silvia Almagia's avatar
Silvia Almagia committed

When **OpenCAPIF** code repository is ready to share a new release we need to follow next steps by a **TSC Member**:
1. Create a new branch with released version, and merge it to **develop**.
2. Create a Merge request from **develop** to **main**.
3. When develop is merged to **main**, then we need to **create a tag with released version.**
Silvia Almagia's avatar
Silvia Almagia committed


## Checking documentation with local deployment
Silvia Almagia's avatar
Silvia Almagia committed

The easy way to check if documentation will be generated properly is check locally with [mike utility](https://github.com/jimporter/mike).
Silvia Almagia's avatar
Silvia Almagia committed

Silvia Almagia's avatar
Silvia Almagia committed

1. You will need python or any python virtual environment installed on your computer with **pip**.
2. Install mike and mkdocs-material:
```
pip install -q mkdocs-material mike
```
3. Run mike development server:
```
mike deploy version1; mike serve
```
4. Use any web browser to reach http://localhost:8000/version1/
Silvia Almagia's avatar
Silvia Almagia committed

> **To see changes on documentation you will need to restart mike server**
Silvia Almagia's avatar
Silvia Almagia committed

## What is the documentation structure
Silvia Almagia's avatar
Silvia Almagia committed

At mkdocs.yml you will have the navigation structure of documentation, there you can sections with sub-sections. after semicolon you can place the markdown to use on it. For example:
```
nav:
  - Overview:
      - Introduction: index.md
  - Getting Started:
      - How to Run: ./gettingstarted/howtorun.md
  - Testing:
      - Test Plan: ./testing/testplan/README.md
      - Robot Framework: ./testing/robotframework/README.md
      - Postman: ./testing/postman/README.md
  - FAQ: ./FAQ.md
```
Silvia Almagia's avatar
Silvia Almagia committed

Silvia Almagia's avatar
Silvia Almagia committed

The page shown on firt view is at doc/index.md.
Silvia Almagia's avatar
Silvia Almagia committed

That page should be updated with latest changes on CAPIF, also including the version.
Silvia Almagia's avatar
Silvia Almagia committed


[OCF Web]: https://ocf.etsi.org/ "OCF Web"
[OCF Documentation]: https://ocf.etsi.org/documentation/ "OCF Documentation"