Skip to content

Commit

Permalink
build: use publish helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ricellis committed Jun 2, 2023
1 parent 6a69870 commit ba4adf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
12 changes: 1 addition & 11 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-06-02T10:46:33Z",
"generated_at": "2023-06-02T10:52:00Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -77,16 +77,6 @@
}
],
"results": {
"Jenkinsfile": [
{
"hashed_secret": "717377a7c62b9a69587e24bd2c0c8ae2ad1b9e15",
"is_secret": false,
"is_verified": false,
"line_number": 91,
"type": "Secret Keyword",
"verified_result": null
}
],
"README.md": [
{
"hashed_secret": "fe568a3dee570ca32995a8e3cd6f2fc7010ad368",
Expand Down
26 changes: 3 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,9 @@ pipeline {

// if it is a release build then do the git tagging
if (isReleaseVersion) {

// Read the CHANGES.md to get the tag message
changes = """"""
changes += readFile('CHANGES.md')
tagMessage = """"""
for (line in changes.readLines()) {
if (!"".equals(line)) {
// append the line to the tagMessage
tagMessage = "${tagMessage}${line}\n"
} else {
break
}
}

// Use git to tag the release at the version
// Awkward workaround until resolution of https://issues.jenkins-ci.org/browse/JENKINS-28335
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-token', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD']]) {
sh "git config user.email \"[email protected]\""
sh "git config user.name \"Jenkins CI\""
sh "git config credential.username ${env.GIT_USERNAME}"
sh "git config credential.helper '!echo password=\$GIT_PASSWORD; echo'"
sh "git tag -a ${version} -m '${tagMessage}'"
sh "git push origin ${version}"
gitTagAndPublish {
isDraft=true
releaseApiUrl='https://api.github.com/repos/IBM/cloudant-spring/releases'
}
}
}
Expand Down

0 comments on commit ba4adf7

Please sign in to comment.