File tree 2 files changed +39
-1
lines changed
2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 56
56
command : |
57
57
./gradlew bootJar
58
58
docker build -t openmf/message-gateway:latest .
59
+ if [ "$CIRCLE_BRANCH" != "master" ]; then
60
+ PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
61
+ PR_TITLE=$(curl -sSL "https://api.github.com/repos/openmf/$CIRCLE_PR_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
62
+ JIRA_STORY=$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
63
+ if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY"; fi
64
+ docker image tag openmf/$CIRCLE_PR_REPONAME:latest openmf/$CIRCLE_PR_REPONAME:$JIRA_STORY
65
+ fi
59
66
60
67
# Log in to DockerHub using environment variables
61
68
- run :
65
72
# Push the Docker image to DockerHub
66
73
- run :
67
74
name : Push Docker image to DockerHub
68
- command : docker push openmf/message-gateway:latest
75
+ command : |
76
+ if [ "$CIRCLE_BRANCH" = "master" ]; then
77
+ docker push openmf/message-gateway:latest
78
+ fi
79
+ if [ "$CIRCLE_BRANCH" != "master" ]; then
80
+ PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
81
+ PR_TITLE=$(curl -sSL "https://api.github.com/repos/openmf/$CIRCLE_PR_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
82
+ JIRA_STORY=$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
83
+ docker push openmf/$CIRCLE_PR_REPONAME:${JIRA_STORY}
84
+ fi
69
85
70
86
workflows :
71
87
version : 2
Original file line number Diff line number Diff line change
1
+ ## Description
2
+
3
+ * PR title should have jira ticket enclosed in ` [] ` .<br >
4
+ Format: ``` [jira_ticket] description ``` <br >
5
+ ex: [ phee-123] PR title.
6
+ * Add a link to the Jira ticket.
7
+ * Describe the changes made and why they were made.
8
+
9
+ ## Checklist
10
+
11
+ Please make sure these boxes are checked before submitting your pull request - thanks!
12
+ - [ ] Followed the PR title naming convention mentioned above.
13
+
14
+ - [ ] Design related bullet points or design document link related to this PR added in the description above.
15
+
16
+ - [ ] Updated corresponding Postman Collection or Api documentation for the changes in this PR.
17
+
18
+ - [ ] Created/updated unit or integration tests for verifying the changes made.
19
+
20
+ - [ ] Added required Swagger annotation and update API documentation with details of any API changes if applicable
21
+
22
+ - [ ] Followed the naming conventions as given in https://docs.google.com/document/d/1Q4vaMSzrTxxh9TS0RILuNkSkYCxotuYk1Xe0CMIkkCU/edit?usp=sharing
You can’t perform that action at this time.
0 commit comments