Skip to content

Commit 1f55345

Browse files
committed
Revert back commented out code
1 parent 807ca80 commit 1f55345

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/create-release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,21 @@ jobs:
3838
run: |
3939
source scripts/lib-jira.sh
4040
source scripts/lib-kosli.sh
41-
RELEASE_ID=10099
4241
43-
set -x
42+
# Fail if release already exists
43+
CURRENT_REL_JSON=$(get_CURRENT_REL_candidate ${{ env.JIRA_PROJECT_ID }})
44+
CURRENT_REL=$(echo "${CURRENT_REL_JSON}" | jq .values)
45+
if [ "${CURRENT_REL}" != "[]" ]; then
46+
echo "Release candidate already exist: ${CURRENT_REL}"
47+
exit 1
48+
fi
49+
50+
# Create the release and get the release ID
51+
TIMESTAMP=$(date -u "+%Y-%m-%d-%H-%M-%S")
52+
CREATE_RESULT_JSON=$(create_release ${{ env.JIRA_PROJECT_ID }} ${TIMESTAMP})
53+
RELEASE_ID=$(echo "${CREATE_RESULT_JSON}" | jq .id)
54+
55+
# Add all jira tickets between prod and staging
4456
JIRA_KEYS=$(get_issue_keys_between_staging_and_prod)
4557
echo "Found issues: ${JIRA_KEYS}"
4658
for JIRA_KEY in ${JIRA_KEYS}; do

0 commit comments

Comments
 (0)