Skip to content

Commit

Permalink
chore: tbs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaklygin committed Jul 13, 2023
1 parent bfca261 commit 8827da8
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/test-jira-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
JIRA_BASE_URL: ${{ secrets.CLOUD_INSTANCE_BASE_URL }}
OWNER: toptal
REPO: picasso
ENV_NAME: temploy
Expand All @@ -39,17 +40,17 @@ jobs:
echo "BASE_REF=${{ steps.branch.outputs.base_ref }}" >> $GITHUB_ENV
echo "HEAD_REF=${{ steps.branch.outputs.head_ref }}" >> $GITHUB_ENV
# - name: Check ENV Variables
# run: |
# requiredVars=("GITHUB_TOKEN" "OWNER" "REPO" "ENV_NAME" "BASE_REF" "HEAD_REF")
- name: Check ENV Variables
run: |
requiredVars=("GITHUB_TOKEN" "CLIENT_ID" "CLIENT_SECRET" "JIRA_BASE_URL" "OWNER" "REPO" "ENV_NAME" "BASE_REF" "HEAD_REF")
# for req in ${requiredVars[@]}; do
# if [ -z "${!req}" ]; then
# echo "Reqired variable '${req}' is blank or not defined"
# allSet=false
# fi
# done
# [[ "${allSet}" == false ]] && exit 1
for req in ${requiredVars[@]}; do
if [ -z "${!req}" ]; then
echo "Reqired variable '${req}' is blank or not defined"
allSet=false
fi
done
[[ "${allSet}" == false ]] && exit 1
- name: Get JIRA tickets
id: get-jira-tickets
Expand Down Expand Up @@ -125,8 +126,6 @@ jobs:
- 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=$(\
curl "${JIRA_BASE_URL}/_edge/tenant_info" | \
Expand Down

0 comments on commit 8827da8

Please sign in to comment.