Skip to content

Commit 8ad867e

Browse files
committed
OPS-60 Fixed update release candidate
1 parent cc71b0e commit 8ad867e

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/generate-jira-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,23 @@ jobs:
4343
CURRENT_REL_JSON=$(get_current_release_candidate ${{ env.JIRA_PROJECT_ID }})
4444
REL_VALUES_JSON=$(echo "${CURRENT_REL_JSON}" | jq .values)
4545
if [ "${REL_VALUES_JSON}" == "[]" ]; then
46-
echo "No release candidate exist: ${CURRENT_REL_JSON}"
46+
echo "No release candidate exist"
4747
echo "release-was-created=true" >> $GITHUB_OUTPUT
4848
4949
# Create the release and get the release ID
5050
TIMESTAMP=$(date -u "+%Y-%m-%d-%H-%M-%S")
5151
CREATE_RESULT_JSON=$(create_release ${{ env.JIRA_PROJECT_ID }} ${TIMESTAMP})
5252
RELEASE_ID=$(echo "${CREATE_RESULT_JSON}" | jq .id)
53-
echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV
5453
5554
PROJECT_KEY=$(echo "${{ vars.JIRA_PROJECT_KEY }}" | cut -d',' -f1)
5655
REL_LINK="${JIRA_BASE_URL}/projects/${PROJECT_KEY}/versions/${RELEASE_ID}"
5756
echo "REL_LINK=${REL_LINK}" >> $GITHUB_ENV
57+
else
58+
echo "Release candidate exist"
59+
RELEASE_ID=$(echo "${REL_VALUES_JSON}" | jq -r '.[0].id')
5860
fi
61+
echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV
62+
echo "Updated Jira release_id: ${RELEASE_ID}" >> $GITHUB_STEP_SUMMARY
5963

6064
- name: Begin trail
6165
if: ${{ steps.release-candidate.outputs.release-was-created }}

apps/backend/backend-content.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This is just a file to test out that changes to back-end source code
22
can trigger a build, reporting to Kosli and Jira
33

4-
counter=74
4+
counter=75

apps/frontend/frontend-content.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This is just a file to test out that changes to front-end source code
22
can trigger a build, reporting to Kosli and Jira
33

4-
counter=58
4+
counter=59

0 commit comments

Comments
 (0)