Skip to content

Commit

Permalink
Test tag and release process
Browse files Browse the repository at this point in the history
  • Loading branch information
dtwaddle2-r7 committed Nov 17, 2023
1 parent 0b9ab3e commit af0c8c2
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,34 @@ pipeline {
}
}

stage('Release') {
stage('Tag / Release') {
when {
anyOf {
expression { params.RELEASE }
}
}

steps {
echo 'temp'
stages {
stage('tag') {
steps {
sh """git tag -a "v\${newVersion}" -m "Version \${newVersion}" && git push --tags"""
}
}

stage('Release') {
steps {
withCredentials([usernamePassword(credentialsId: 'github-app-key', usernameVariable: 'GH_APP', passwordVariable: 'GH_TOKEN')]) {
sh """
curl --silent --show-error \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token \${GH_TOKEN}" \
-d '{"tag_name":"'"v${newVersion}"'", "generate_release_notes": true, "name": "'"v${newVersion} - \$(date +"%Y.%m.%d")"'"}' \
https://api.github.com/repos/rapid7/recog/releases > recog-content-releases-response.json
"""
}
}
}
}

/**
Expand Down

0 comments on commit af0c8c2

Please sign in to comment.