master
branch contains the latest changes. All PRs usually need to be sent to master.stable
branch contains latest releases (https://github.com/hyperledger/indy-node/releases). Hotfixes need to be sent to both stable and master.release-*
branches hold release candidates during release workflowhotfix-*
branches hold release candidates during hotfix workflow
- Each PR needs to be reviewed.
- PR can be merged only after all tests pass and code is reviewed.
- for each PR we execute:
- static code validation
- Unit/Integration tests
- We use pipeline in code approach and Jenkins as our main CI/CD server.
- CI part of the pipeline (running tests for each PR) is defined in
Jenkinsfile.ci
file. - CI part is run on Hyperledger and Sovrin Foundation Jenkins servers, so they are public and open as every contributor needs to see results of the tests run for his or her PR.
- We use flake8 for static code validation.
- It's run against every PR. PR fails if there are some static code validation errors.
- Not all checks are enabled (have a look at
.flake8
file at the project root) - You can run static code validation locally:
- Install flake8:
pip install flake8
- Run validation on the root folder of the project:
flake8 .
- Install flake8:
- CD part of the pipeline is defined in
Jenkinsfile.cd
file. - CD part is run on Sovrin Foundation Jenkins server dealing with issuing and uploading new builds.
What artifacts are produced after each push
- to
master
branch:- all artifacts include developmental release segment
devN
in their version - indy-plenum:
- indy-plenum in pypi
- indy-plenum deb package in
https://repo.sovrin.org/deb xenial master-latest
- indy-node:
- indy-node in pypi
- indy-node deb package in
https://repo.sovrin.org/deb xenial master-latest
- indy-node deb package in
https://repo.sovrin.org/deb xenial master
(copied frommaster-latest
) - indy-plenum deb package in
https://repo.sovrin.org/deb xenial master
(copied frommaster-latest
)
- all artifacts include developmental release segment
- to
release-*
andhotfix-*
branches:- all artifacts include pre-release segment
rcN
in their version - indy-plenum:
- indy-plenum in pypi
- indy-plenum deb package in
https://repo.sovrin.org/deb xenial rc-latest
- indy-node:
- indy-node in pypi
- indy-node deb package in
https://repo.sovrin.org/deb xenial rc-latest
- indy-node deb package in
https://repo.sovrin.org/deb xenial rc
(copied fromrc-latest
) - indy-plenum deb package in
https://repo.sovrin.org/deb xenial rc
(copied fromrc-latest
)
- all artifacts include pre-release segment
- to
stable
branch:- indy-plenum:
- indy-plenum in pypi
- indy-plenum deb package in
https://repo.sovrin.org/deb xenial stable-latest
- indy-plenum release tag (https://github.com/hyperledger/indy-plenum/releases)
- indy-node:
- indy-node in pypi
- indy-node deb package in
https://repo.sovrin.org/deb xenial stable-latest
(re-packed fromrc-latest
) - indy-node deb package in
https://repo.sovrin.org/deb xenial stable
(copied fromrc-latest
) - indy-plenum deb package in
https://repo.sovrin.org/deb xenial stable
(copied fromstable-latest
) - indy-node release tag (https://github.com/hyperledger/indy-node/releases)
- indy-plenum:
Use cases for artifacts
- PyPI artifacts can be used for development experiments, but not intended to be used for production.
- Using deb packages is recommended way to be used for a test/production pool on Ubuntu.
- indy-node deb package from
https://repo.sovrin.org/deb xenial stable
is one and the only official stable release that can be used for production (stable version). - indy-node deb package from
https://repo.sovrin.org/deb xenial master
contains the latest changes (from master branch). It's not guaranteed that that this code is stable enough.
- indy-node deb package from
- Ubuntu 16.04 on x86_64
We use fpm for packaging python code into deb packages. Build scripts are placed in build-scripts
folders:
- https://github.com/hyperledger/indy-node/blob/master/build-scripts
- https://github.com/hyperledger/indy-plenum/blob/master/build-scripts
We also pack some 3rd parties dependencies which are not presented in canonical ubuntu repositories:
- https://github.com/hyperledger/indy-node/blob/master/build-scripts/ubuntu-1604/build-3rd-parties.sh
- https://github.com/hyperledger/indy-plenum/blob/master/build-scripts/ubuntu-1604/build-3rd-parties.sh
Each build-scripts
folder includes Readme.md
. Please check them for more details.
- Please note, that we are using versioning that satisfies PEP 440 with release segment as
MAJOR.MINOR.PATCH
that satisfies SemVer as well. - Version is set in the code (see __version__.json).
- Version is bumped for new releases / hotfixes either manually or using bump_version.sh script. The latter is preferred.
- During development phase version includes developmental segment
devN
, whereN
is set for CD pipeline artifacts as incremented build number of build server jobs. In the source code it is just equal to0
always. - During release preparation phase (release / hotfix workflows) version includes pre-release segment
rcN
, whereN>=1
and set in the source code by developers. - Each dependency (including indy-plenum) has a strict version (see 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 share the same versioning scheme.
- Differences in master and stable code:
setup.py
: different versions of indy-plenum dependency- different versions in migrations scripts
- 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). 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)
- 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
- [Maintainer]
- Create
release-X.Y.Z
branch fromstable
(during the first RC preparation only).
- Create
- [Contributor]
- Create
rc-X.Y.Z.rcN
branch fromrelease-X.Y.Z
(N
starts from1
and is incremented for each new RC). - Apply necessary changes from
master
(eithermerge
orcherry-pick
). - (optional) [
indy-node
] Set stable (just X.Y.Z)indy-plenum
version insetup.py
. - Set the package version
./bump_version.sh X.Y.Z.rcN
. - Commit, push and create a PR to
release-X.Y.Z
.
- Create
- Until PR is merged:
- [build server]
- Run CI for the PR and notifies GitHub.
- [Maintainer]
- Review the PR.
- Either ask for changes or merge.
- [Contributor]
- (optional) Update the PR if either CI failed or reviewer asked for changes.
- (optional) [indy-node] Bump
indy-plenum
version insetup.py
if changes require newindy-plenum
release.
- [build server]
Note If any of the following steps fails new release candidate should be prepared.
- [Maintainer]
- Start release candidate pipeline manually.
- [build server]
- Checkout the repository.
- Publish to PyPI as
X.Y.Z.rcN
. - Bump version locally to
X.Y.Z
, commit and push as therelease commit
to remote. - Build debian packages:
- for the project: source code version would be
X.Y.Z
, debian package versionX.Y.Z~rcN
; - for the 3rd party dependencies missed in the official debian repositories.
- for the project: source code version would be
- Publish the packages to
rc-latest
debian channel. - [
indy-node
] Copy the package along with its dependencies (includingindy-plenum
) fromrc-latest
torc
channel. - [
indy-node
] Run system tests for therc
channel. - Create release PR from
release-X.Y.Z
(that points torelease commit
) branch tostable
. - Notify maintainers.
- Wait for an approval to proceed. It shouldn't be provided until
release PR
passes all necessary checks (e.g. DCO, CI testing, maintainers reviews etc.).
- [build server]
- Run CI for the PR and notify GitHub.
- [QA]
- (optional) Perform additional testing.
- [Maintainer]
- Review the PR but do not merge it.
- If approved: let build server to proceed.
- Otherwise: stop the pipeline.
- [build server]
- If approved:
- perform fast-forward merge;
- create and push tag
vX.Y.Z
; - Notify maintainers.
- Otherwise rollback
release commit
by movingrelease-X.Y.Z
to its parent.
- If approved:
- [build server] triggered once the
release PR
is merged- Publish to PyPI as
X.Y.Z
. - Download and re-pack debian package
X.Y.Z~rcN
(fromrc-latest
channel) toX.Y.Z
changing only the package name. - Publish the package to
rc-latest
debian channel. - Copy the package along with its dependencies from
rc-latest
tostable-latest
channel. - [
indy-node
] Copy the package along with its dependencies (includingindy-plenum
) fromstable-latest
tostable
channel. - [
indy-node
] Run system tests for thestable
channel. - Notify maintainers.
- Publish to PyPI as
- [Contributor]:
- Create PR to
master
with version bump toX'.Y'.Z'.dev0
, whereX'.Y'.Z'
is next target release version. Usually it increments one ofX
,Y
orZ
and resets lower parts (check SemVer for more details), e.g.:X.Y.Z+1
- bugfix releaseX.Y+1.0
- feature release, backwards compatible API additions/changesX+1.0.0
- major release, backwards incompatible API changes
- Create PR to
Hotfix release is quite similar except the following difference:
- hotfix branches named
hotfix-X.Y.Z
; master
usually is not merged since hotfixes (as a rule) should include only fixes for stable code.