File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060 ./gradlew checkstyleMain
6161 ./gradlew bootJar
6262 docker build -t openmf/ph-ee-bulk-processor:latest .
63+ if [ "$CIRCLE_BRANCH" != "master" ]; then
64+ PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
65+ PR_TITLE=$(curl -sSL "https://api.github.com/repos/openmf/$CIRCLE_PR_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
66+ JIRA_STORY=$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
67+ if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY"; fi
68+ docker image tag openmf/$CIRCLE_PR_REPONAME:latest openmf/$CIRCLE_PR_REPONAME:$JIRA_STORY
69+ fi
6370
6471 # Log in to DockerHub using environment variables
6572 - run :
6976 # Push the Docker image to DockerHub
7077 - run :
7178 name : Push Docker image to DockerHub
72- command : docker push openmf/ph-ee-bulk-processor:latest
79+ command : |
80+ if [ "$CIRCLE_BRANCH" = "master" ]; then
81+ docker push openmf/ph-ee-bulk-processor:latest
82+ fi
83+ if [ "$CIRCLE_BRANCH" != "master" ]; then
84+ PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
85+ PR_TITLE=$(curl -sSL "https://api.github.com/repos/openmf/$CIRCLE_PR_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
86+ JIRA_STORY=$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
87+ docker push openmf/$CIRCLE_PR_REPONAME:${JIRA_STORY}
88+ fi
7389
7490workflows :
7591 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