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 272d7d1 commit f225c1c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/test-jira-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,20 @@ jobs:
fi
- name: Convert your JIRA base URL into a Cloud ID
id: get-cloud-id
if: ${{ env.JIRA_KEYS != '' }}
env:
JIRA_BASE_URL: ${{ secrets.CLOUD_INSTANCE_BASE_URL }}
run: |
CLOUD_ID_TOKEN=$(\
CLOUD_ID=$(\
curl "${JIRA_BASE_URL}/_edge/tenant_info" | \
jq --raw-output '.cloudId'
)
echo "CLOUD_ID_TOKEN=$CLOUD_ID_TOKEN" >> $GITHUB_ENV
echo "CLOUD_ID=$CLOUD_ID" >> $GITHUB_OUTPUT
- name: Get Access Token
id: get-access-token
if: ${{ env.JIRA_KEYS != '' }}
run: |
ACCESS_TOKEN=$(\
Expand All @@ -151,7 +153,7 @@ jobs:
jq --raw-output '.access_token'
)
echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_ENV
echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_OUTPUT
- name: Send request to Create new JIRA deployment
if: ${{ env.JIRA_KEYS != '' }}
Expand All @@ -161,8 +163,8 @@ jobs:
RESPONSE=$(curl --silent \
--request POST \
--url "https://api.atlassian.com/jira/deployments/0.1/cloud/${CLOUD_ID_TOKEN}/bulk" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--url "https://api.atlassian.com/jira/deployments/0.1/cloud/${{ steps.get-cloud-id.output.CLOUD_ID }}/bulk" \
--header "Authorization: Bearer ${{ steps.get-access-token.output.ACCESS_TOKEN }}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
Expand Down

0 comments on commit f225c1c

Please sign in to comment.