Skip to content

Commit

Permalink
chore: tbs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaklygin committed Jul 12, 2023
1 parent af9106f commit 2332a36
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/test-jira-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,17 @@ jobs:
jq --raw-output '.cloudId'
)
# Check if CLOUD_ID is empty
if [ -z "$CLOUD_ID" ]; then
echo "Error: CLOUD_ID is empty"
exit 1
fi
echo "CLOUD_ID=$CLOUD_ID" >> $GITHUB_OUTPUT
- name: Get Access Token
id: get-access-token
if: ${{ env.JIRA_KEYS != '' }}
if: ${{ env.JIRA_KEYS != '' && success() }}
run: |
ACCESS_TOKEN=$(\
curl --silent \
Expand All @@ -150,16 +156,19 @@ jobs:
"client_secret": "'${CLIENT_SECRET}'",
"audience": "api.atlassian.com"
}' | \
jq --raw-output '.'
jq --raw-output '.access_token'
)
# access_token
echo "$ACCESS_TOKEN"
# Check if ACCESS_TOKEN is empty
if [ -z "$ACCESS_TOKEN" ]; then
echo "Error: ACCESS_TOKEN is empty"
exit 1
fi
echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_OUTPUT
- name: Send request to Create new JIRA deployment
if: ${{ env.JIRA_KEYS != '' }}
if: ${{ env.JIRA_KEYS != '' && success() }}
run: |
JIRA_KEYS_QUOTED=$(echo "$JIRA_KEYS" | sed "s/,/\",\"/g")
JIRA_KEYS_QUOTED="\"$JIRA_KEYS_QUOTED\""
Expand Down

0 comments on commit 2332a36

Please sign in to comment.