diff --git a/docs/source/ci-cd.md b/docs/source/ci-cd.md index 61da9cda8..c2e557578 100644 --- a/docs/source/ci-cd.md +++ b/docs/source/ci-cd.md @@ -2,10 +2,11 @@ #### Branches -At the moment work is being done so that `ubuntu20.04-upgrade` becomes the new master/main branch. +At the moment work is being done so that `ubuntu-20.04-upgrade` becomes the new master/main branch. The old `master` will be moved to `ubuntu16` branch. +The documentation for the old "legacy" process will reside in that branch. -- `master` branches contains the latest changes. All PRs usually need to be sent to master. +- `master` | `ubuntu-20.04` branches contains the latest changes. All PRs usually need to be sent to `master` | `ubuntu-20.04-upgrade`. @@ -36,7 +37,7 @@ The old `master` will be moved to `ubuntu16` branch. ## Continuous Delivery -- CD part of the pipeline is defined in `.github/workflows/publishRelease.yaml` & `.github/workflows/PR.yaml` file. +- CD part of the pipeline is defined in `.github/workflows/tag.yaml`, `.github/workflows/releasepr.yaml`, and `.github/workflows/publishRelease.yaml` file. - CD part is run via GitHubActions issuing and uploading new builds. #### Builds @@ -104,22 +105,9 @@ Each `build-scripts` folder includes `Readme.md`. Please check them for more det - different versions in migrations scripts -##### For releases `< 1.7.0` (deprecated) -- Please note, that we are using semver-like approach for versioning (major, minor, build) for each of the components. -- Major and minor parts are set in the code (see [\_\_metadata\_\_.py](https://github.com/hyperledger/indy-node/blob/master/indy_node/__metadata__.py)). They must be incremented for new releases manually from code if needed. -- Build part is incremented with each build on Jenkins (so it always increases, but may be not sequentially) -- Each dependency (including indy-plenum) has a strict version (see [setup.py](https://github.com/hyperledger/indy-node/blob/master/setup.py)) -- If you install indy-node (either from pypi, or from deb package), the specified in setup.py version of indy-plenum is installed. -- Master and Stable builds usually have different versions. -- Differences in master and stable code: - - `setup.py`: - - dev suffix in project names and indy-plenum dependency in master; no suffixes in stable - - different versions of indy-plenum dependency - - different versions in migrations scripts - ## Release workflow -The diagram for the Release Workflow can be found [here](release-workflow.png). It starts with setting a tag in the form of `setRelease-v..[-rc]`. +![release-workflow](./release-workflow.png) ### Feature Release @@ -142,7 +130,7 @@ It starts with setting a tag in the form of `setRelease-v.. 1. [**Maintainer**] - Wait till the PR with the updated Version number from the RC preperation step is created and the Pipeline has run its tests (`releasepr.yaml` run successfully). 2. [**Maintainer**] - - If all checks passed and RC is approved merge the update version PR. It will kick of the `Releasepr.yaml`Pipeline, which creates a Github Release and publishes the packages. + - If all checks passed and RC is approved merge the update version PR. It will kick of the `publishRelease.yaml` Pipeline, which creates a Github Release and publishes the packages. - Otherwise: just close the update version PR **without** merging. 3. [**GHA (`publishRelease.yaml`)**] - Gets the artifacts from the last successfull `releasepr.yaml` run. diff --git a/docs/source/release-workflow.png b/docs/source/release-workflow.png new file mode 100644 index 000000000..3007ce062 Binary files /dev/null and b/docs/source/release-workflow.png differ diff --git a/docs/source/release-workflow.puml b/docs/source/release-workflow.puml new file mode 100644 index 000000000..79d17610e --- /dev/null +++ b/docs/source/release-workflow.puml @@ -0,0 +1,81 @@ +@startuml + +:**Tag Triggered - Release Workflow**; +start + +:Create a tag on the branch and commit on which the release +is to be based. + +The tag must be in the following format: + - ""setRelease-v..[-rc]"" + +Examples: + - To generate an RC Release (marked as a pre-release) + - ""setRelease-v1.12.6-rc0"" + - To generate an official Release + - ""setRelease-v1.12.6""; + +partition "**Workflow**: tag.yaml" { + floating note left + Workflow triggered + by the ""setRelease"" + tag being pushed. + end note + + :Extract information; + note left:Extract version number from tag + :Bump version number; + :Create Pull Request to the branch, where the tag was set on; +} + +partition "**Workflow**: releasepr.yaml" { + floating note left + Workflow triggered + by Pull Request affecting + **ONLY** ""indy_node/_version_.json"". + end note + + :Extract information; + if (isVersionBump) then (yes) + :Lint using ""indy-shared-gha""; + :build Docker-images using ""indy-shared-gha""; + :Execute tests (""reuseable_tests.yaml""); + :Esecute ""indy-test-automation""; + note left: WIP + :build packages using ""indy-shared-gha""; + note left: packages published to workflow + else (no) + endif +} + +if (**Review PR** - All tests passed?) then (Merge PR) + partition "**Workflow**: publishRelease.yaml" { + floating note right + Workflow triggered by + pushes affecting + **ONLY** + ""indy_node/_version_.json"". + end note + + :Extract version number from the commit message; + if (isVersionBump) then (yes) + :Download artifacts from last successfull ""releasepr"" run; + :Create a GitHub Release; + :Set tag and title to match release version; + + if (is RC Release) then (yes) + :Set pre-release checkbox; + else (no) + endif + :Publish GitHub Release + - Containing the artifacts; + :Publish Packages using ""indy-shared-gha""; + else (no) + endif + } +else (Close PR without Merging) + :Release process aborted; +endif + +stop +@enduml