Skip to content

Commit 58fea23

Browse files
committed
Updated scripts with new/refreshed headers and descriptions.
1 parent 6b19984 commit 58fea23

53 files changed

Lines changed: 582 additions & 505 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/Batch/build_and_upload_batch.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
<#
2+
.SYNOPSIS
3+
Publishes the sbm console app for Windows and Linux, then uploads as Azure Batch application packages.
4+
.DESCRIPTION
5+
Builds self-contained publish artifacts for win-x64 and linux-x64 targets, creates zip
6+
packages from the publish output, and uploads them to an Azure Batch account as versioned
7+
application packages (SqlBuildManagerWindows and SqlBuildManagerLinux). The version is
8+
read from the built sbm.exe assembly.
9+
.PARAMETER path
10+
Directory for zip output artifacts.
11+
.PARAMETER resourceGroupName
12+
Azure resource group containing the Batch account.
13+
.PARAMETER batchAcctName
14+
Name of the Azure Batch account.
15+
.PARAMETER action
16+
BuildOnly, UploadOnly, or BuildAndUpload (default).
17+
#>
118
param
219
(
320
[string] $path,

scripts/Batch/build_and_upload_batch_fromprefix.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
<#
2+
.SYNOPSIS
3+
Resolves resource names from a prefix and delegates to build_and_upload_batch.ps1.
4+
.DESCRIPTION
5+
Wrapper script that loads standard resource names from a deployment prefix,
6+
then calls build_and_upload_batch.ps1 to publish, package, and upload the
7+
SQL Build Manager console application as Azure Batch application packages.
8+
.PARAMETER prefix
9+
Environment name prefix used to derive resource names.
10+
.PARAMETER resourceGroupName
11+
Azure resource group name. Derived from prefix if not specified.
12+
.PARAMETER action
13+
BuildOnly, UploadOnly, or BuildAndUpload (default).
14+
.PARAMETER path
15+
Output directory for build artifacts. Defaults to src\TestConfig.
16+
#>
117
param
218
(
319
[Parameter(Mandatory=$true)]

scripts/ContainerRegistry/build_external_test_image.ps1

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
1+
<#
2+
.SYNOPSIS
3+
Builds and pushes the external (integration) test container image to ACR.
4+
.DESCRIPTION
5+
Copies the src/ folder (excluding build artifacts like .vs, bin, obj) to a temp
6+
directory and uses ACR Build to build the Dockerfile.tests image. The resulting
7+
image contains the test runner, Azure CLI, and kubectl for running integration
8+
tests in Azure Container Instances.
9+
.PARAMETER prefix
10+
Environment name prefix used to derive the ACR name.
11+
.PARAMETER resourceGroupName
12+
Azure resource group containing the container registry.
13+
.PARAMETER wait
14+
Whether to wait for the ACR build to complete. Default: true.
15+
.PARAMETER imageTag
16+
Tag for the built image. Default: "test-runner".
17+
#>
218
param
319
(
420
[string] $prefix,

scripts/ContainerRegistry/build_runtime_image.ps1

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
1+
<#
2+
.SYNOPSIS
3+
Builds and pushes the production SQL Build Manager runtime container image to ACR.
4+
.DESCRIPTION
5+
Copies the src/ folder to a clean temp directory (excluding .vs, bin, obj, TestConfig,
6+
TestResults), reads the assembly version from AssemblyVersioning.cs, then builds the
7+
Dockerfile via ACR Build with date, version, and latest-vNext tags.
8+
.PARAMETER azureContainerRegistry
9+
Name of the Azure Container Registry.
10+
.PARAMETER resourceGroupName
11+
Azure resource group containing the container registry.
12+
.PARAMETER wait
13+
Whether to wait for the ACR build to complete. Default: true.
14+
#>
215
param
316
(
417
[string] $azureContainerRegistry,

scripts/ContainerRegistry/build_runtime_image_fromprefix.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
<#
2+
.SYNOPSIS
3+
Resolves resource names from a prefix and delegates to build_runtime_image.ps1.
4+
.DESCRIPTION
5+
Wrapper script that loads standard resource names from a deployment prefix,
6+
then calls build_runtime_image.ps1 to build and push the production runtime
7+
container image to Azure Container Registry.
8+
.PARAMETER prefix
9+
Environment name prefix used to derive resource names.
10+
.PARAMETER resourceGroupName
11+
Azure resource group containing the container registry.
12+
.PARAMETER path
13+
Output directory for key files. Defaults to src\TestConfig.
14+
.PARAMETER wait
15+
Whether to wait for the ACR build to complete. Default: true.
16+
#>
117
param
218
(
319
[string] $prefix,

scripts/Database/create_database_override_files.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
<#
2+
.SYNOPSIS
3+
Creates SQL Server database override config files for integration tests.
4+
.DESCRIPTION
5+
Enumerates all SQL Servers and databases in the resource group and generates
6+
multiple test configuration files: database target lists (with tags, bad targets,
7+
client targets, double-client targets) and a server.txt file. These files are
8+
used by ExternalTest projects to target the correct databases during integration tests.
9+
.PARAMETER path
10+
Output directory for config files. Defaults to src\TestConfig.
11+
.PARAMETER prefix
12+
Environment name prefix used to derive resource names.
13+
#>
114
param
215
(
316
[string] $path,

scripts/cleanup/cleanup.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<#
2+
.SYNOPSIS
3+
Cleans up Kubernetes resources left behind by integration tests.
4+
.DESCRIPTION
5+
Deletes the Kubernetes job, secrets, config maps, Azure identity, identity binding,
6+
and secret provider class resources from the cluster that were created during test runs.
7+
#>
18
kubectl delete job sqlbuildmanager
29
kubectl delete secret connection-secrets
310
kubectl delete configmap runtime-properties

scripts/cleanup/delete_batch_pools_fromprefix.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<#
2+
.SYNOPSIS
3+
Deletes all Azure Batch pools in all Batch accounts for a given deployment prefix.
4+
.DESCRIPTION
5+
Lists all Batch accounts in the prefix resource group, enumerates their pools,
6+
and deletes each pool. Used to clean up Batch resources after integration tests.
7+
.PARAMETER prefix
8+
Environment name prefix used to derive resource names.
9+
#>
110
param
211
(
312
[Parameter(Mandatory=$true)]

scripts/cleanup/delete_databases_fromprefix.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<#
2+
.SYNOPSIS
3+
Deletes all SQL Server instances in the resource group for a given deployment prefix.
4+
.DESCRIPTION
5+
Lists all SQL servers in the prefix resource group and deletes each one,
6+
including their elastic pools and databases. Used to tear down test databases.
7+
.PARAMETER prefix
8+
Environment name prefix used to derive resource names.
9+
#>
110
param
211
(
312
[Parameter(Mandatory=$true)]

scripts/cleanup/delete_eventhub_fromprefix.ps1

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
<#
2+
.SYNOPSIS
3+
Deletes the Event Hubs namespace for a given deployment prefix.
4+
.DESCRIPTION
5+
Resolves the Event Hubs namespace name from the prefix and deletes it from
6+
the resource group. Used to tear down messaging resources after testing.
7+
.PARAMETER prefix
8+
Environment name prefix used to derive resource names.
9+
#>
110
param
211
(
312
[string] $prefix
413
)
5-
6-
# Get the repo root
7-
$repoRoot = $env:AZD_PROJECT_PATH
814
if ([string]::IsNullOrWhiteSpace($repoRoot)) {
915
$repoRoot = Split-Path (Split-Path (Split-Path $script:MyInvocation.MyCommand.Path -Parent) -Parent) -Parent
1016
}

0 commit comments

Comments
 (0)