Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Khoroshavin committed Jun 28, 2019
2 parents 16d3c18 + 33457e7 commit dc4c2fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 8 additions & 4 deletions devops/aws-codebuild/Jenkinsfile.cd
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ pipelineWrapper({
List projects = ['sovtoken', 'sovtokenfees']
List pkgsList = []
String indyNodeVersion
Boolean isRC = false
Boolean isRelease = false
Boolean isDev = (env.BRANCH_NAME == 'master')

stage('Checkout sources from SCM') {
checkout scm
Expand All @@ -53,7 +56,9 @@ pipelineWrapper({
if (!indyNodeVersion) {
throw new Exception('indy-node version is not found')
}
logger.info("Detected indy-node version: '$indyNodeVersion'")
isRC = !!((env.BRANCH_NAME == 'stable') && indyNodeVersion.find(/[^0-9\.]/))
isRelease = ((env.BRANCH_NAME == 'stable') && !isRC)
logger.info("Detected indy-node version: '$indyNodeVersion', isRC: $isRC, isRelease: $isRelease")
}

Map builds = [
Expand Down Expand Up @@ -113,8 +118,7 @@ pipelineWrapper({


stage('Set release parameters') {
def releaseVersion = env.BRANCH_NAME == 'stable' ? '' : "$BUILD_NUMBER"

def releaseVersion = isRelease ? '' : (isRC ? 'rc' : isDev ? 'dev' : '') + "$BUILD_NUMBER"
debPVersion = "$srcVersion${releaseVersion ? '~' + releaseVersion : ''}"
logger.info("Package version for sovrin repo: $debPVersion")
}
Expand Down Expand Up @@ -180,7 +184,7 @@ pipelineWrapper({
String repoComponent = env.BRANCH_NAME
String debsDir = 'debs'

if ((env.BRANCH_NAME == 'stable') && indyNodeVersion.find(/[^0-9\.]/)) {
if (isRC) {
repoComponent = 'rc'
}
logger.info("Debian repo component is set to: '$repoComponent'")
Expand Down
10 changes: 4 additions & 6 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ There are several types of releases:
3. Publishing and Notification
1. Built packages are published to the repository component depending on the `indy-node` dependency version and GitHub branch as it was mentioned above:
- `master` commits are published to `master`, debian packages include unique pipeline build number as part of their versions.
- `stable` commits are published to `rc` if `indy-node` version is *non stable* (e.g. `1.8.0~rc1`) and to `stable` otherwise. These artifacts' versions match ones from the source code.
- `stable` commits are published to `rc` if `indy-node` version is *non stable* (e.g. `1.8.0~rc1`) and to `stable` otherwise.
`stable` packages' versions match ones from the source code and `rc` packages will have additional suffix.

## Release Workflow

Expand All @@ -47,8 +48,5 @@ There are several types of releases:
2. [**Maintainer**] once CI testing is passed, reviews, approves and merges that PR.
3. [**build server**]
- Once PR is merged starts the [release pipeline](#release-pipeline) which publishes debian packages to `stable` repo component.


### Important Note

Commits to `stable` with plugins versions and `indy-node` version that were already published can't be published again since release logic detects duplicates in the debian repository and skips publishing for such cases.
4. New development cycle start
1. [**Contributor**] creates a PR version bumps in [sovtoken/__metadata__.py](../sovtoken/sovtoken/__metadata__.py) and [sovtokenfees/__metadata__.py](../sovtokenfees/sovtokenfees/__metadata__.py)

0 comments on commit dc4c2fd

Please sign in to comment.