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:"
|
echo "Creating cluster using config:"
|
||||||
cat constellation-conf.yaml
|
cat constellation-conf.yaml
|
||||||
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' || true
|
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
|
- name: Cdbg deploy
|
||||||
if: inputs.isDebugImage == 'true'
|
if: inputs.isDebugImage == 'true'
|
||||||
|
@ -40,4 +40,9 @@ runs:
|
|||||||
|
|
||||||
- name: Constellation terminate
|
- name: Constellation terminate
|
||||||
shell: bash
|
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
|
shell: bash
|
||||||
if: inputs.cloudProvider == 'azure'
|
if: inputs.cloudProvider == 'azure'
|
||||||
run: |
|
run: |
|
||||||
|
output=$(constellation --help)
|
||||||
|
if [[ $output == *"tf-log"* ]]; then
|
||||||
|
TFFLAG="--tf-log=DEBUG"
|
||||||
|
fi
|
||||||
constellation iam create azure \
|
constellation iam create azure \
|
||||||
--region=${{ inputs.azureRegion }} \
|
--region=${{ inputs.azureRegion }} \
|
||||||
--resourceGroup="${{ inputs.namePrefix }}-rg" \
|
--resourceGroup="${{ inputs.namePrefix }}-rg" \
|
||||||
--servicePrincipal="${{ inputs.namePrefix }}-sp" \
|
--servicePrincipal="${{ inputs.namePrefix }}-sp" \
|
||||||
--generate-config --yes --tf-log=DEBUG
|
--generate-config --yes ${TFFLAG:-}
|
||||||
|
|
||||||
- name: Constellation iam create gcp
|
- name: Constellation iam create gcp
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -39,4 +39,8 @@ runs:
|
|||||||
- name: Delete IAM configuration
|
- name: Delete IAM configuration
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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