Skip to content

Commit 79f9b88

Browse files
committed
go back to code
1 parent 10048bb commit 79f9b88

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

articles/batch/batch-ci-cd.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ For each new task that the following steps specify:
435435
1. Select the **Download Pipeline Artifacts** task, and set the following properties:
436436
- **Display name**: Enter *Download ApplicationPackage to Agent*.
437437
- **Artifact name**: Enter *hpc-application*.
438-
- **Destination directory**: Enter *$(System.DefaultWorkingDirectory)*.
438+
- **Destination directory**: Enter `$(System.DefaultWorkingDirectory)`.
439439

440440
1. Create a Storage account to store your ARM templates. You could use an existing storage account, but to support this self-contained example and isolation of content, make a dedicated storage account.
441441

@@ -444,19 +444,19 @@ For each new task that the following steps specify:
444444
- **Azure Resource Manager connection**: Select the service connection to use.
445445
- **Subscription:** Select the appropriate Azure subscription.
446446
- **Action**: Select **Create or update resource group**.
447-
- **Resource group**: Enter *$(resourceGroupName)*.
448-
- **Location**: Enter *$(location)*.
449-
- **Template**: Enter *$(System.ArtifactsDirectory)/\<AzureRepoArtifactSourceAlias>/arm-templates/storageAccount.json*.
450-
- **Override template parameters**: Enter *-accountName $(storageAccountName)*.
447+
- **Resource group**: Enter `$(resourceGroupName)`.
448+
- **Location**: Enter `$(location)`.
449+
- **Template**: Enter `$(System.ArtifactsDirectory)/<AzureRepoArtifactSourceAlias>/arm-templates/storageAccount.json`.
450+
- **Override template parameters**: Enter `-accountName $(storageAccountName)`.
451451

452452
1. Upload the artifacts from source control into the storage account. As part of this Azure Pipelines task, the Storage account container URI and SAS token are output to a variable in Azure Pipelines, so they can be reused throughout this agent phase.
453453

454454
Select the **Azure File Copy** task, and set the following properties:
455455
- **Display name:** Enter *AzureBlob File Copy*.
456-
- **Source:** Enter *$(System.ArtifactsDirectory)/\<AzureRepoArtifactSourceAlias>/arm-templates/*.
456+
- **Source:** Enter `$(System.ArtifactsDirectory)/<AzureRepoArtifactSourceAlias>/arm-templates/`.
457457
- **Azure Subscription:** Select the appropriate Azure subscription.
458458
- **Destination Type**: Select **Azure Blob**.
459-
- **RM Storage Account**: Enter *$(storageAccountName)*.
459+
- **RM Storage Account**: Enter `$(storageAccountName)`.
460460
- **Container Name**: Enter *templates*.
461461
- **Reference name**: Expand **Output Variables**, then enter *ffmpeg*.
462462

@@ -470,11 +470,11 @@ For each new task that the following steps specify:
470470
- **Azure Resource Manager connection:** Select the appropriate Azure subscription.
471471
- **Subscription:** Select the appropriate Azure subscription.
472472
- **Action**: Select **Create or update resource group**.
473-
- **Resource group**: Enter *$(resourceGroupName)*.
474-
- **Location**: Enter *$(location)*.
473+
- **Resource group**: Enter `$(resourceGroupName)`.
474+
- **Location**: Enter `$(location)`.
475475
- **Template location**: Select **URL of the file**.
476-
- **Template link:** Enter *$(StorageContainerUri)arm-templates/deployment.json$(StorageContainerSasToken)*.
477-
- **Override template parameters**: Enter *-StorageContainerUri $(StorageContainerUri) -StorageContainerSasToken $(StorageContainerSasToken) -applicationStorageAccountName $(applicationStorageAccountName) -batchAccountName $(batchAccountName) -batchAccountPoolName $(batchAccountPoolName)*.
476+
- **Template link:** Enter `$(StorageContainerUri)arm-templates/deployment.json$(StorageContainerSasToken)`.
477+
- **Override template parameters**: Enter `-StorageContainerUri $(StorageContainerUri) -StorageContainerSasToken $(StorageContainerSasToken) -applicationStorageAccountName $(applicationStorageAccountName) -batchAccountName $(batchAccountName) -batchAccountPoolName $(batchAccountPoolName)`.
478478

479479
A common practice is to use Azure Key Vault tasks. If the service principal connected to your Azure subscription has an appropriate access policy set, it can download secrets from Key Vault and be used as a variable in your pipeline. The name of the secret is set with the associated value. For example, you could reference a secret of **sshPassword** with *$(sshPassword)* in the release definition.
480480

@@ -485,7 +485,7 @@ For each new task that the following steps specify:
485485
- **Azure Resource Manager connection:** Select the appropriate Azure subscription.
486486
- **Script Type**: Select **PowerShell Core**.
487487
- **Script Location**: Select **Inline script**.
488-
- **Inline Script**: Enter *az batch application create --application-name $(batchAccountApplicationName) --name $(batchAccountName) --resource-group $(resourceGroupName)*.
488+
- **Inline Script**: Enter `az batch application create --application-name $(batchAccountApplicationName) --name $(batchAccountName) --resource-group $(resourceGroupName)`.
489489

490490
1. Call Azure CLI to upload associated packages to the application, in this case the ffmpeg files.
491491

@@ -494,7 +494,7 @@ For each new task that the following steps specify:
494494
- **Azure Resource Manager connection:** Select the appropriate Azure subscription.
495495
- **Script Type**: Select **PowerShell Core**.
496496
- **Script Location**: Select **Inline script**.
497-
- **Inline Script**: Enter *az batch application package create --application-name $(batchAccountApplicationName) --name $(batchAccountName) --resource-group $(resourceGroupName) --version $(batchApplicationVersion) --package-file=$(System.DefaultWorkingDirectory)/$(Release.Artifacts.<AzureBuildArtifactSourceAlias>.BuildId).zip*.
497+
- **Inline Script**: Enter `az batch application package create --application-name $(batchAccountApplicationName) --name $(batchAccountName) --resource-group $(resourceGroupName) --version $(batchApplicationVersion) --package-file=$(System.DefaultWorkingDirectory)/$(Release.Artifacts.<AzureBuildArtifactSourceAlias>.BuildId).zip`.
498498

499499
> [!NOTE]
500500
> The version number of the application package is set to a variable. The variable allows overwriting previous versions of the package and lets you manually control the package version pushed to Azure Batch.
-970 Bytes
Loading

0 commit comments

Comments
 (0)