fix: tf acc test pipeline
[skip ci]
This commit is contained in:
parent
30e4ce6b2d
commit
eecf98f4b1
2 changed files with 30 additions and 10 deletions
38
.github/actions/acc_test/action.yaml
vendored
38
.github/actions/acc_test/action.yaml
vendored
|
|
@ -39,6 +39,12 @@ inputs:
|
|||
service_account_json_content:
|
||||
description: "STACKIT service account JSON file contents"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
service_account_json_content_b64:
|
||||
description: "STACKIT service account JSON file contents"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
service_account_json_file_path:
|
||||
description: "STACKIT service account JSON file contents"
|
||||
|
|
@ -126,13 +132,12 @@ runs:
|
|||
${{ steps.goenv.outputs.gomodcache }}
|
||||
key: ${{ runner.os }}-gopkg
|
||||
|
||||
- name: Ensure service account file exists
|
||||
- name: Creating service_account file from json input
|
||||
if: inputs.service_account_json_content != ''
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
|
||||
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
|
||||
|
||||
jsonFile="${{ inputs.service_account_json_file_path }}"
|
||||
jsonFile="${jsonFile:-x}"
|
||||
|
|
@ -142,16 +147,31 @@ runs:
|
|||
fi
|
||||
|
||||
if [ ! -f "${jsonFile}" ]; then
|
||||
echo "unable to find service account file '${{ inputs.service_account_json_file_path }}'"
|
||||
#if [ "${jsonFileContent:-x}" == "x" ]; then
|
||||
# echo "ERROR: service_account_json_file_content MUST NOT be empty if account file is missing"
|
||||
# exit 1
|
||||
#fi
|
||||
#echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
|
||||
echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
|
||||
echo "${{ inputs.service_account_json_content }}" > stackit/"${{ inputs.service_account_json_file_path }}"
|
||||
fi
|
||||
ls -l stackit/"${{ inputs.service_account_json_file_path }}"
|
||||
|
||||
- name: Creating service_account file from base64 json input
|
||||
if: inputs.service_account_json_content_b64 != ''
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
set -x
|
||||
|
||||
jsonFile="${{ inputs.service_account_json_file_path }}"
|
||||
jsonFile="${jsonFile:-x}"
|
||||
if [ "${jsonFile}" == "x" ]; then
|
||||
echo "no service account file path provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${jsonFile}" ]; then
|
||||
echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
|
||||
echo "${{ inputs.service_account_json_content_b64 }}" | base64 -d > stackit/"${{ inputs.service_account_json_file_path }}"
|
||||
fi
|
||||
ls -l stackit/"${{ inputs.service_account_json_file_path }}"
|
||||
|
||||
- name: Run acceptance test file
|
||||
if: ${{ inputs.test_file != '' }}
|
||||
shell: bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue