Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,18 @@ pipeline {
beforeAgent true
allOf {
buildingTag()
anyOf {
tag pattern: /${env.SVRE_PRE_RELEASE_TAG}/, comparator: "REGEXP"
}
tag pattern: /${env.SVRE_PRE_RELEASE_TAG}/, comparator: "REGEXP"
}
}
steps {
publishPublic()
gitsh('github.com') {
publishDocs()
}
publishGitHubRelease(
tag: env.TAG_NAME,
assets: getReleaseAssets(env.TAG_NAME.replaceFirst(/^v(?=${env.SVRE_RELEASE})/,''))
)
}
}
}
Expand All @@ -238,6 +240,7 @@ def artifactUrl
def moduleId
def buildType
def scanCode
def getReleaseAssets

void defaultInit() {
// Default to using bump-my-version
Expand Down Expand Up @@ -318,6 +321,10 @@ void defaultInit() {
sh "${scannerHome}/bin/sonar-scanner -Dsonar.qualitygate.wait=true -Dsonar.projectKey=cloudant-${libName}-sdk -Dsonar.exclusions=examples/**"
}
}

getReleaseAssets = { tagVersion ->
return []
}
}

// Language specific implementations of the methods:
Expand All @@ -341,6 +348,21 @@ void applyCustomizations() {
artifactUrl = "${STAGE_ROOT}storage/cloudant-sdks-pypi-local/ibmcloudant/${env.NEW_SDK_VERSION}"
moduleId = "ibmcloudant:${env.NEW_SDK_VERSION}"
}

getReleaseAssets = { tagVersion ->
return [
[
name: "ibmcloudant-${tagVersion}.tar.gz",
path: "dist/ibmcloudant-${tagVersion}.tar.gz",
contentType: 'application/gzip'
],
[
name: "ibmcloudant-${tagVersion}-py3-none-any.whl",
path: "dist/ibmcloudant-${tagVersion}-py3-none-any.whl",
contentType: 'application/zip'
]
]
}
}

void buildSdk() {
Expand Down
Loading