-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs and workflow for pusblish them
- Loading branch information
Showing
19 changed files
with
456 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Deploy docs | ||
on: | ||
workflow_call: | ||
jobs: | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Setup doc deploy | ||
run: | | ||
git config --global user.name Docs deploy | ||
git config --global user.email docs@dummy.bot.com | ||
- name: Install dependencies | ||
run: pip install mkdocs-material mkdocs-include-markdown-plugin mike | ||
|
||
- name: Deploy docs | ||
run: mike deploy --push -m "Update docs to version ${{ github.ref_name }}" --update-aliases ${{ github.ref_name }} latest | ||
|
||
- name: Set latest as default doc branch | ||
run: mike set-default --push latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
__pycache__/ | ||
**/__pycache__/ | ||
site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"MD013": false, | ||
"MD007": {"indent": 4} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs/index.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.mermaid { | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Continuous Integration Documentation | ||
|
||
This documentation provides an overview of the different jobs and their execution in the CI workflow. The CI workflow consists of several jobs that automate various tasks such as linters, executing tests, generating and deploying documentation and creating releases. Each job is triggered based on specific events. | ||
|
||
## Pull Request workflow | ||
--- | ||
|
||
{% include-markdown "development/ci/pullrequest.md" %} | ||
|
||
## Release workflow | ||
--- | ||
|
||
{% include-markdown "development/ci/release.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
The pull Request Workflow, defined in the `pullrequest.yml` file, is triggered on `pull_request_target` events to the branches `master` and `main`. It has three jobs: **linters**, **build**, **tests**, and **report_results**. | ||
|
||
```mermaid | ||
graph LR | ||
A[pull_request_target] --> B[linters] --> C[tests]; | ||
``` | ||
|
||
### Linters | ||
|
||
This job performs the following steps: | ||
|
||
1. Checks out the code | ||
1. Installs pre-commit. | ||
1. Runs pre-commit hooks to execute code linting based on `.pre-commit-config.yaml` file | ||
|
||
#### Running local pre-commit | ||
|
||
!!! info | ||
Main purpose for pre-commit is to allow developers to pass the Lint Checks before commiting the code. Same checks will be executed on all the commits once they are pushed to GitHub | ||
|
||
--- | ||
|
||
To install pre-commit checks locally, follow these steps: | ||
|
||
1. Install [pre-commit](https://pre-commit.com/) by running the following command: | ||
|
||
```console | ||
pip install pre-commit | ||
``` | ||
|
||
1. `ruby` is required for running the Markdown Linter, installation will depends on your Operating System, for example, on Fedora: | ||
|
||
```console | ||
dnf install -y ruby | ||
``` | ||
|
||
1. Initialize pre-commit on the repo: | ||
|
||
```console | ||
pre-commit install | ||
``` | ||
|
||
--- | ||
|
||
To run pre-commit manually for all files, you can use: | ||
|
||
```console | ||
$ pre-commit run --all-files | ||
markdownlint.............................................................Passed | ||
Test shell scripts with shellcheck.......................................Passed | ||
check json...............................................................Passed | ||
flake8...................................................................Passed | ||
pylint...................................................................Passed | ||
``` | ||
|
||
Or you can run against an especific file: | ||
|
||
```console | ||
$ pre-commit run --files docs/index.md | ||
markdownlint.............................................................Passed | ||
Test shell scripts with shellcheck...................(no files to check)Skipped | ||
check json...........................................(no files to check)Skipped | ||
flake8...............................................(no files to check)Skipped | ||
pylint...............................................(no files to check)Skipped | ||
``` | ||
|
||
Pre-commit hooks can be updated using `pre-commit autoupdate`: | ||
|
||
```console | ||
$ pre-commit autoupdate | ||
[https://github.com/igorshubovych/markdownlint-cli] already up to date! | ||
[https://github.com/jumanjihouse/pre-commit-hooks] already up to date! | ||
[https://github.com/pre-commit/pre-commit-hooks] already up to date! | ||
[https://github.com/PyCQA/flake8] already up to date! | ||
[https://github.com/PyCQA/pylint] already up to date! | ||
``` | ||
|
||
### Tests | ||
|
||
{% include-markdown "development/ci/tests.md" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
The Release workflow, defined in the `release.yml` file, when a new tag is pushed it triggers: **release-build** and **image-upload**. | ||
|
||
```mermaid | ||
graph LR | ||
A[new tag pushed] --> B[deploy-docs]; | ||
``` | ||
|
||
The `deploy-docs` job is triggered when a new release is `published`, this is done by the `release_build` job. | ||
|
||
### Docs Update | ||
|
||
Uses the `Deploy docs` workflow defined in the `docs.yml` file to generate and deploy the documentation performing the following steps: | ||
|
||
1. Checks out the code. | ||
1. Sets up Python 3.x. | ||
1. Exports the release tag version as an environment variable. | ||
1. Sets up the Git configuration for documentation deployment. | ||
1. Installs the required dependencies, including mkdocs-material and mike. | ||
1. Deploys the documentation using the mike deploy command, with specific parameters for updating aliases and including the release tag version in the deployment message. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
The Tests Workflow, defined in the `tests.yml` file, has one job: **test-rosa** which includes a matrix on each subplatforms, **hypershift** and **terraform**. | ||
|
||
Before installing the clusters, the automation prepares the environment with following tasks: | ||
|
||
- Checkout code | ||
- Download tools (ocm, rosa, terraform and aws cli) | ||
- Create AWS account file | ||
- Install python requirements with pip | ||
|
||
#### Test Hypershift | ||
|
||
It deploys one Hosted Cluster on the Service Cluster assigned to Perf&Scale | ||
|
||
#### Test Terraform | ||
|
||
It deploys one Rosa Cluster using the terraform ocm provider on Stage Environment |
Empty file.
Oops, something went wrong.