fix weekly e2e test permission issue

This commit is contained in:
zjhe 2023-03-08 14:13:17 +08:00
parent 32196f0dd6
commit 800ed76ce6
2 changed files with 5 additions and 4 deletions

View File

@ -17,15 +17,14 @@ jobs:
continue-on-error: true
timeout-minutes: 1440
run: |
cd .git
sudo chmod -R a+rwX .
sudo find . -type d -exec chmod g+s '{}' +
cd ..
git config --global --add safe.directory '*'
az login --identity --username $MSI_ID > /dev/null
export ARM_SUBSCRIPTION_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .id')
export ARM_TENANT_ID=$(az login --identity --username $MSI_ID | jq -r '.[0] | .tenantId')
docker run --rm -v $(pwd):/src -w /src/test -e MSI_ID -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_USE_MSI=true -e CHANGED_FOLDERS mcr.microsoft.com/azterraform sh -c "go mod tidy && go test -timeout=1440m -v ./e2e"
cd .git
sudo chmod -R a+rwX .
sudo find . -type d -exec chmod g+s '{}' +
- name: Update
run: |
docker run --rm -v $(pwd):/src -w /src mcr.microsoft.com/azterraform sh scripts/update-test-record.sh

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash
git config --global --add safe.directory '*'
if [ ! -d "TestRecord" ]; then
echo "No TestRecord found, exit"
exit 0