mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: only add tf-log flag if the binary supports it
We sometimes run older CLI versions in the CI. Those versions may not support the flag.
This commit is contained in:
parent
3770cada91
commit
1180b376fa
@ -184,7 +184,12 @@ runs:
|
||||
echo "Creating cluster using config:"
|
||||
cat constellation-conf.yaml
|
||||
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' || true
|
||||
constellation create -c ${{ inputs.controlNodesCount }} -w ${{ inputs.workerNodesCount }} -y --force --debug --tf-log=DEBUG
|
||||
|
||||
output=$(constellation --help)
|
||||
if [[ $output == *"tf-log"* ]]; then
|
||||
TFFLAG="--tf-log=DEBUG"
|
||||
fi
|
||||
constellation create -c ${{ inputs.controlNodesCount }} -w ${{ inputs.workerNodesCount }} -y --force --debug ${TFFLAG:-}
|
||||
|
||||
- name: Cdbg deploy
|
||||
if: inputs.isDebugImage == 'true'
|
||||
|
@ -40,4 +40,9 @@ runs:
|
||||
|
||||
- name: Constellation terminate
|
||||
shell: bash
|
||||
run: constellation terminate --yes --tf-log=DEBUG
|
||||
run: |
|
||||
output=$(constellation --help)
|
||||
if [[ $output == *"tf-log"* ]]; then
|
||||
TFFLAG="--tf-log=DEBUG"
|
||||
fi
|
||||
constellation terminate --yes ${TFFLAG:-}
|
||||
|
@ -51,11 +51,15 @@ runs:
|
||||
shell: bash
|
||||
if: inputs.cloudProvider == 'azure'
|
||||
run: |
|
||||
output=$(constellation --help)
|
||||
if [[ $output == *"tf-log"* ]]; then
|
||||
TFFLAG="--tf-log=DEBUG"
|
||||
fi
|
||||
constellation iam create azure \
|
||||
--region=${{ inputs.azureRegion }} \
|
||||
--resourceGroup="${{ inputs.namePrefix }}-rg" \
|
||||
--servicePrincipal="${{ inputs.namePrefix }}-sp" \
|
||||
--generate-config --yes --tf-log=DEBUG
|
||||
--generate-config --yes ${TFFLAG:-}
|
||||
|
||||
- name: Constellation iam create gcp
|
||||
shell: bash
|
||||
|
@ -39,4 +39,8 @@ runs:
|
||||
- name: Delete IAM configuration
|
||||
shell: bash
|
||||
run: |
|
||||
constellation iam destroy --yes --tf-log=DEBUG
|
||||
output=$(constellation --help)
|
||||
if [[ $output == *"tf-log"* ]]; then
|
||||
TFFLAG="--tf-log=DEBUG"
|
||||
fi
|
||||
constellation iam destroy --yes ${TFFLAG:-}
|
||||
|
Loading…
Reference in New Issue
Block a user