Skip to content

Commit

Permalink
chore: automatically create a jira release
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed Sep 4, 2024
1 parent 04a0592 commit d39856f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,9 @@ jobs:
- run:
name: Publish to GitHub
command: ./release-scripts/upload-artifacts.sh github
- run:
name: Create Jira Release
command: ./release-scripts/create-jira-release.sh
- failed-release-notification

release-npm:
Expand Down
16 changes: 16 additions & 0 deletions release-scripts/create-jira-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euox pipefail

curl --fail --request POST \
--url 'https://snyksec.atlassian.net/rest/api/3/version' \
--user "$JIRA_USER_EMAIL:$JIRA_TOKEN" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data "{
\"archived\": false,
\"description\": \"https://github.com/snyk/cli/releases/tag/v$(cat binary-releases/version)\",
\"name\": \"$(cat binary-releases/version)\",
\"projectId\": 11104,
\"releaseDate\": \"$(date +%Y-%m-%d)\",
\"released\": true
}"

0 comments on commit d39856f

Please sign in to comment.