added step to pipeline to delete blobs

This commit is contained in:
Victoria Hall 2024-08-16 10:20:35 -05:00
Родитель a9d547fc2e
Коммит 5e2417df22
3 изменённых файлов: 20 добавлений и 0 удалений

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

@ -0,0 +1,8 @@
from azure.storage.blob import ContainerClient
# Clean up blobs
container_client = ContainerClient.from_connection_string(conn_str="AzureWebJobsStorage",
container_name="python-worker-tests")
blobs_list = container_client.list_blobs()
for blob in blobs_list:
container_client.delete_blob(blob.name)

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

@ -127,3 +127,14 @@ jobs:
AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
USETESTPYTHONSDK: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true))
displayName: "Running $(PYTHON_VERSION) Python E2E Tests"
- bash: |
python eng/scripts/clean-up-resources.py
env:
AzureWebJobsStorage: $(STORAGE_CONNECTION)
AzureWebJobsCosmosDBConnectionString: $(COSMOSDB_CONNECTION)
AzureWebJobsEventHubConnectionString: $(EVENTHUB_CONNECTION)
AzureWebJobsServiceBusConnectionString: $(SERVICEBUS_CONNECTION)
AzureWebJobsSqlConnectionString: $(SQL_CONNECTION)
AzureWebJobsEventGridTopicUri: $(EVENTGRID_URI)
AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
displayName: "Clean Up Test Resources"

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

@ -45,6 +45,7 @@ Repository = "https://github.com/Azure/azure-functions-python-worker"
dev = [
"azure-eventhub", # Used for EventHub E2E tests
"azure-functions-durable", # Used for Durable E2E tests
"azure-storage-blob", # Used for cleaning up test resources
"flask",
"fastapi~=0.103.2",
"pydantic",