Skip to content

Commit

Permalink
RF-26499 Use CircleCI contexts, add JIRA closer
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarber committed Jan 9, 2023
1 parent 4f0213b commit ef41458
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ jobs:
gem build pronto-commentator
gem push pronto-commentator-*.gem
update_jira:
docker:
- image: alpine:3.8
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_TOKEN
steps:
- run:
name: Install dependencies
command: apk add --no-cache bash curl git openssh
- checkout
- run:
name: Update JIRA
command: .circleci/update-jira.sh

workflows:
version: 2
test_and_deploy:
Expand All @@ -74,3 +89,10 @@ workflows:
- /^v.*/
context:
- DockerHub
- RubyGems
- update_jira:
context:
- DockerHub
- update-jira-webhook
requires:
- push_to_rubygems
10 changes: 10 additions & 0 deletions .circleci/update-jira.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -euo pipefail

# Use JIRA automation webhooks to move issues to SHIPPED:
# https://support.atlassian.com/jira-software-cloud/docs/automation-triggers/#Automationtriggers-Incomingwebhook

git log --max-count=50 --pretty=format:'%s' | grep -Eo '^\w+-[0-9]+' | sort -u | while read i; do
curl -X POST "$UPDATE_JIRA_WEBHOOK_URL?issue=$i"
done

0 comments on commit ef41458

Please sign in to comment.