Skip to content

Commit

Permalink
Update circle ci variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
apurbraj authored Jul 23, 2024
1 parent fdc4a08 commit e5ecf95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ jobs:
docker build -t fynarfin/ph-ee-connector-channel:latest .
if [ "$CIRCLE_BRANCH" != "develop" ]; then
PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
PR_TITLE=$(curl -sSL "https://api.github.com/repos/fynarfin/$CIRCLE_PR_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
PR_TITLE=$(curl -sSL "https://api.github.com/repos/fynarfin/$CIRCLE_PROJECT_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
JIRA_STORY=$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
if [ -z "$JIRA_STORY" ]; then echo "Invalid PR title" && exit 1; else echo "Ticket NO: $JIRA_STORY"; fi
docker image tag fynarfin/$CIRCLE_PR_REPONAME:latest fynarfin/$CIRCLE_PR_REPONAME:$JIRA_STORY
docker image tag fynarfin/$CIRCLE_PROJECT_REPONAME:latest fynarfin/$CIRCLE_PROJECT_REPONAME:$JIRA_STORY
fi
# Log in to DockerHub using environment variables
- run:
Expand All @@ -93,9 +93,9 @@ jobs:
fi
if [ "$CIRCLE_BRANCH" != "develop" ]; then
PR_NUMBER=$(basename $CIRCLE_PULL_REQUEST)
PR_TITLE=$(curl -sSL "https://api.github.com/repos/fynarfin/$CIRCLE_PR_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
PR_TITLE=$(curl -sSL "https://api.github.com/repos/fynarfin/$CIRCLE_PROJECT_REPONAME/pulls/$PR_NUMBER" | jq -r '.title')
JIRA_STORY=$(echo $PR_TITLE | cut -d "[" -f2 | cut -d "]" -f1 | tr '[A-Z]' '[a-z]')
docker push fynarfin/$CIRCLE_PR_REPONAME:${JIRA_STORY}
docker push fynarfin/$CIRCLE_PROJECT_REPONAME:${JIRA_STORY}
fi
docker-image-availability-check-and-upgrade:
docker:
Expand Down

0 comments on commit e5ecf95

Please sign in to comment.