test: assure that CSEResultFilePath is generated by Windows CSE (#4194)

This commit is contained in:
Chou Hu 2024-03-21 13:16:05 +08:00 коммит произвёл GitHub
Родитель 3c28b3c7fb
Коммит 3ce636cef7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
16 изменённых файлов: 71 добавлений и 2 удалений

Просмотреть файл

@ -41,6 +41,19 @@ collect-logs() {
err "Failed in deleting cse logs in remote storage. Error code is $retval."
fi
fi
array=(azcopy_*)
${array[0]}/azcopy copy "https://${AZURE_E2E_STORAGE_ACCOUNT_NAME}.blob.core.windows.net/${AZURE_E2E_STORAGE_LOG_CONTAINER}/${DEPLOYMENT_VMSS_NAME}-provision.complete" $SCENARIO_NAME-logs/$WINDOWS_E2E_IMAGE$WINDOWS_GPU_DRIVER_SUFFIX-provision.complete || retval=$?
if [ "$retval" -ne 0 ]; then
err "Failed in downloading provision.complete. Error code is $retval."
exit 1
else
log "provision.complete is generated"
${array[0]}/azcopy rm "https://${AZURE_E2E_STORAGE_ACCOUNT_NAME}.blob.core.windows.net/${AZURE_E2E_STORAGE_LOG_CONTAINER}/${DEPLOYMENT_VMSS_NAME}-provision.complete" || retval=$?
if [ "$retval" -ne 0 ]; then
err "Failed in deleting provision.complete in remote storage. Error code is $retval."
fi
fi
}
E2E_RESOURCE_GROUP_NAME="$AZURE_E2E_RESOURCE_GROUP_NAME-$WINDOWS_E2E_IMAGE$WINDOWS_GPU_DRIVER_SUFFIX-$K8S_VERSION"
@ -183,7 +196,7 @@ else
fi
log "Collect cse log"
collect-logs
collect-logs
cat $SCENARIO_NAME-vmss.json

Просмотреть файл

@ -5,4 +5,4 @@ param(
[string]$arg4
)
Invoke-WebRequest -UseBasicParsing https://aka.ms/downloadazcopy-v10-windows -OutFile azcopy.zip;expand-archive azcopy.zip;cd .\azcopy\*; $env:AZCOPY_AUTO_LOGIN_TYPE="MSI"; $env:AZCOPY_MSI_RESOURCE_STRING=$arg4; .\azcopy.exe copy "C:\azuredata\CustomDataSetupScript.log" "https://$arg1.blob.core.windows.net/$arg2/$arg3-cse.log"
Invoke-WebRequest -UseBasicParsing https://aka.ms/downloadazcopy-v10-windows -OutFile azcopy.zip;expand-archive azcopy.zip;cd .\azcopy\*; $env:AZCOPY_AUTO_LOGIN_TYPE="MSI"; $env:AZCOPY_MSI_RESOURCE_STRING=$arg4; .\azcopy.exe copy "C:\azuredata\CustomDataSetupScript.log" "https://$arg1.blob.core.windows.net/$arg2/$arg3-cse.log"; .\azcopy.exe copy "C:\AzureData\provision.complete" "https://$arg1.blob.core.windows.net/$arg2/$arg3-provision.complete"

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -59,6 +59,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,

Просмотреть файл

@ -8278,6 +8278,10 @@ param(
[ValidateNotNullOrEmpty()]
$LogFile,
# C:\AzureData\provision.complete
# MUST keep generating this file when CSE is done and do not change the name
# - It is used to avoid running CSE multiple times
# - Some customers use this file to check if CSE is done
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
$CSEResultFilePath,