Skip to content

Commit 86b53b5

Browse files
committed
Debug
1 parent 00e6d0b commit 86b53b5

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

.github/actions/generate-jira-release/action.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ inputs:
88
kosli-flow:
99
description: 'Kosli flow'
1010
required: true
11-
kosli-cli-version:
12-
description: 'Kosli CLI version'
13-
required: true
1411
kosli-template-file:
1512
description: 'Kosli template file'
1613
required: true
@@ -23,6 +20,12 @@ inputs:
2320
kosli-flow-source:
2421
description: 'Kosli flow source'
2522
required: true
23+
kosli-cli-version:
24+
description: 'Kosli CLI version'
25+
required: true
26+
kosli-api-token:
27+
description: 'Kosli API token'
28+
required: true
2629
jira-base-url:
2730
description: 'Jira base URL'
2831
required: true
@@ -32,8 +35,8 @@ inputs:
3235
jira-project-id:
3336
description: 'Jira project ID'
3437
required: true
35-
kosli-api-token:
36-
description: 'Kosli API token'
38+
jira-project-key:
39+
description: 'Jira project key'
3740
required: true
3841
jira-api-token:
3942
description: 'Jira API token'
@@ -51,34 +54,33 @@ runs:
5154
id: release-candidate
5255
shell: bash
5356
env:
54-
JIRA_PROJECT_ID: ${{ inputs.jira-project-id }}
55-
JIRA_BASE_URL: ${{ inputs.jira-base-url }}
5657
JIRA_USERNAME: ${{ inputs.jira-username }}
5758
JIRA_API_TOKEN: ${{ inputs.jira-api-token }}
5859
run: |
5960
echo "STEP: Create or get Jira release candidate"
6061
source scripts/lib-jira.sh
6162
62-
CURRENT_REL_JSON=$(get_current_release_candidate ${{ env.JIRA_PROJECT_ID }})
63+
CURRENT_REL_JSON=$(get_current_release_candidate ${{ inputs.jira-project-id }})
6364
REL_VALUES_JSON=$(echo "${CURRENT_REL_JSON}" | jq .values)
6465
if [ "${REL_VALUES_JSON}" == "[]" ]; then
6566
echo "No release candidate exist"
6667
echo "release-was-created=true" >> $GITHUB_OUTPUT
6768
6869
# Create the release and get the release ID
6970
TIMESTAMP=$(date -u "+%Y-%m-%d-%H-%M-%S")
70-
CREATE_RESULT_JSON=$(create_release ${{ env.JIRA_PROJECT_ID }} ${TIMESTAMP})
71+
CREATE_RESULT_JSON=$(create_release ${{ inputs.jira-project-id }} ${TIMESTAMP})
7172
RELEASE_ID=$(echo "${CREATE_RESULT_JSON}" | jq .id)
7273
73-
PROJECT_KEY=$(echo "${{ vars.JIRA_PROJECT_KEY }}" | cut -d',' -f1)
74-
REL_LINK="${JIRA_BASE_URL}/projects/${PROJECT_KEY}/versions/${RELEASE_ID}"
74+
PROJECT_KEY=$(echo "${{ inputs.jira-project-key }}" | cut -d',' -f1)
75+
REL_LINK="${{ inputs.jira-base-url }}/projects/${PROJECT_KEY}/versions/${RELEASE_ID}"
7576
echo "REL_LINK=${REL_LINK}" >> $GITHUB_ENV
77+
echo "Created Jira release_id: ${RELEASE_ID}" >> $GITHUB_STEP_SUMMARY
7678
else
7779
echo "Release candidate exist"
7880
RELEASE_ID=$(echo "${REL_VALUES_JSON}" | jq -r '.[0].id')
81+
echo "Updated Jira release_id: ${RELEASE_ID}" >> $GITHUB_STEP_SUMMARY
7982
fi
8083
echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV
81-
echo "Updated Jira release_id: ${RELEASE_ID}" >> $GITHUB_STEP_SUMMARY
8284
8385
- name: Begin trail
8486
if: ${{ steps.release-candidate.outputs.release-was-created }}
@@ -97,15 +99,15 @@ runs:
9799
shell: bash
98100
run: |
99101
source scripts/lib-jira.sh
100-
kosli_trail_link="https://app.kosli.com/${{ env.KOSLI_ORG }}/flows/${{ env.KOSLI_FLOW }}/trails/${{ env.RELEASE_ID }}"
102+
kosli_trail_link="https://app.kosli.com/${{ inputs.kosli-org }}/flows/${{ inputs.kosli-flow }}/trails/${{ env.RELEASE_ID }}"
101103
add_trail_link_to_release ${{ env.RELEASE_ID }} ${kosli_trail_link}
102104
103105
- name: Report current prod SW
104106
if: ${{ steps.release-candidate.outputs.release-was-created }}
105107
shell: bash
106108
run: |
107109
source scripts/lib-kosli.sh
108-
get_current_running_env_json ${{ env.KOSLI_ENV_PROD }} > /tmp/prod-env.json
110+
get_current_running_env_json ${{ inputs.kosli-env-prod }} > /tmp/prod-env.json
109111
create_running_sw_short_list_json /tmp/prod-env.json > /tmp/prod-sw.json
110112
111113
kosli attest custom \
@@ -120,7 +122,7 @@ runs:
120122
shell: bash
121123
run: |
122124
source scripts/lib-kosli.sh
123-
get_current_running_env_json ${{ env.KOSLI_ENV_STAGING }} > /tmp/staging-env.json
125+
get_current_running_env_json ${{ inputs.kosli-env-staging }} > /tmp/staging-env.json
124126
create_running_sw_short_list_json /tmp/staging-env.json > /tmp/staging-sw.json
125127
126128
kosli attest custom \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ jobs:
2626
jira-base-url: ${{ vars.JIRA_BASE_URL }}
2727
jira-username: ${{ secrets.KOSLI_JIRA_USERNAME }}
2828
jira-project-id: ${{ vars.JIRA_PROJECT_ID }}
29-
# jira-project-key: ${{ vars.JIRA_PROJECT_KEY }}
29+
jira-project-key: ${{ vars.JIRA_PROJECT_KEY }}
3030
jira-api-token: ${{ secrets.KOSLI_JIRA_API_TOKEN }}

0 commit comments

Comments
 (0)