ci: add notify hook to Terraform module test (#2653)

* Enable notification on tf module e2e test failure
* Dont try to change fields with no value

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-11-28 14:14:18 +01:00 committed by GitHub
parent 43f47cc5c5
commit 3bc25cdd8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -175,6 +175,12 @@ function editItem() {
local itemID="${2}" local itemID="${2}"
local id="${3}" local id="${3}"
local value="${4}" local value="${4}"
if [[ -z ${value} ]]; then
debug skipping empty value
return
fi
flags=( flags=(
"--project-id=${projectID}" "--project-id=${projectID}"
"--id=${itemID}" "--id=${itemID}"

View File

@ -273,3 +273,15 @@ jobs:
echo "Files constellation-mastersecret.json or constellation-conf.yaml still exist" echo "Files constellation-mastersecret.json or constellation-conf.yaml still exist"
exit 1 exit 1
fi fi
- name: Notify about failure
if: |
failure() &&
github.ref == 'refs/heads/main' &&
github.event_name == 'schedule'
continue-on-error: true
uses: ./.github/actions/notify_e2e_failure
with:
projectWriteToken: ${{ secrets.PROJECT_WRITE_TOKEN }}
test: "terraform-module"
provider: ${{ inputs.cloudProvider }}