Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding what happens when no rc tag exist #610

Merged
merged 2 commits into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,14 @@ jobs:
- run:
name: get rc tag of the final tag
command: |
RC_TAG=$(git tag --contains ${CIRCLE_SHA1} | grep -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+rc[[:digit:]]+' | head -n 1)
echo "Found RC version: ${RC_TAG}"
echo $RC_TAG >> ~/RC_TAG
if [[ $(RC_TAG=$(git tag --contains ${CIRCLE_SHA1} | grep -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+rc[[:digit:]]+' | head -n 1)) ]] ; then
echo "Found RC version: ${RC_TAG}"
echo $RC_TAG >> ~/RC_TAG
else
echo "No Rc Tag found for commit"
circleci-agent step halt
fi

- persist_to_workspace:
root: ~/
paths:
Expand Down Expand Up @@ -253,7 +258,11 @@ jobs:
- get_beta_and_rc_tags
- run:
command: |
echo $RC_TAG
if [ -z $RC_TAG ] ; then
circleci-agent step halt
else
echo $RC_TAG
fi
- adding_tag_to_ecr_container_image:
image_repo: << parameters.image_repo >>
source_image_tag: $RC_TAG
Expand Down