Merge pull request #362 from jaysterp/jeburke/transfer
ACR Transfer ARM templates
This commit is contained in:
Коммит
38fdca4ca3
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string",
|
||||
"defaultValue": "[resourceGroup().location]",
|
||||
"metadata": {
|
||||
"description": "Location for all resources."
|
||||
}
|
||||
},
|
||||
"registryName": {
|
||||
"type": "string",
|
||||
"minLength": 5,
|
||||
"maxLength": 50,
|
||||
"metadata": {
|
||||
"description": "Name of your Azure Container Registry"
|
||||
}
|
||||
},
|
||||
"exportPipelineName": {
|
||||
"type": "string",
|
||||
"minLength": 5,
|
||||
"maxLength": 50,
|
||||
"metadata": {
|
||||
"description": "Name of your export pipeline."
|
||||
}
|
||||
},
|
||||
"userAssignedIdentity": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The user assigned identity to be bound to the task run."
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"targetUri": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The target URI of the export pipeline."
|
||||
}
|
||||
},
|
||||
"keyVaultUri": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The key vault secret uri to obtain the target storage SAS token."
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The list of all options configured for the pipeline."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"targetType": "AzureStorageBlobContainer",
|
||||
"systemIdentity": {
|
||||
"type": "SystemAssigned"
|
||||
},
|
||||
"userIdentity": {
|
||||
"type": "UserAssigned",
|
||||
"userAssignedIdentities": {
|
||||
"[parameters('userAssignedIdentity')]": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.ContainerRegistry/registries",
|
||||
"apiVersion": "2019-12-01-preview",
|
||||
"name": "[parameters('registryName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"comments": "Container registry for storing docker images",
|
||||
"tags": {
|
||||
"displayName": "Container Registry",
|
||||
"container.registry": "[parameters('registryName')]"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Premium",
|
||||
"tier": "Premium"
|
||||
},
|
||||
"properties": {
|
||||
"adminUserEnabled": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.ContainerRegistry/registries/exportPipelines/",
|
||||
"name": "[concat(parameters('registryName'), '/', parameters('exportPipelineName'))]",
|
||||
"location": "[parameters('location')]",
|
||||
"apiVersion": "2019-12-01-preview",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.ContainerRegistry/registries', parameters('registryName'))]"
|
||||
],
|
||||
"identity": "[if(not(empty(parameters('userAssignedIdentity'))), variables('userIdentity'), variables('systemIdentity'))]",
|
||||
"properties": {
|
||||
"target": {
|
||||
"type": "[variables('targetType')]",
|
||||
"uri": "[parameters('targetUri')]",
|
||||
"keyVaultUri": "[parameters('keyVaultUri')]"
|
||||
},
|
||||
"options": "[parameters('options')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"registryName": {
|
||||
"value": "myregistry"
|
||||
},
|
||||
"exportPipelineName": {
|
||||
"value": "myExportPipeline"
|
||||
},
|
||||
"targetUri": {
|
||||
"value": "https://accountname.blob.core.windows.net/containername"
|
||||
},
|
||||
"keyVaultUri": {
|
||||
"value": "https://myvault.vault.azure.net/secrets/acrexportsas"
|
||||
},
|
||||
"options": {
|
||||
"value": [
|
||||
"OverwriteBlobs",
|
||||
"ContinueOnErrors"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string",
|
||||
"defaultValue": "[resourceGroup().location]",
|
||||
"metadata": {
|
||||
"description": "Location for all resources."
|
||||
}
|
||||
},
|
||||
"registryName": {
|
||||
"type": "string",
|
||||
"minLength": 5,
|
||||
"maxLength": 50,
|
||||
"metadata": {
|
||||
"description": "Name of your Azure Container Registry"
|
||||
}
|
||||
},
|
||||
"importPipelineName": {
|
||||
"type": "string",
|
||||
"minLength": 5,
|
||||
"maxLength": 50,
|
||||
"metadata": {
|
||||
"description": "Name of your import pipeline."
|
||||
}
|
||||
},
|
||||
"userAssignedIdentity": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The user assigned identity to be bound to the task run."
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"sourceUri": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The source URI of the import pipeline."
|
||||
}
|
||||
},
|
||||
"keyVaultUri": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The key vault secret uri to obtain the source storage SAS token."
|
||||
}
|
||||
},
|
||||
"sourceTriggerStatus": {
|
||||
"type": "string",
|
||||
"defaultValue": "Enabled",
|
||||
"metadata": {
|
||||
"description": "Indicates whether you want to enable the source trigger on the import pipeline."
|
||||
},
|
||||
"allowedValues": [
|
||||
"Enabled",
|
||||
"Disabled"
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "The list of all options configured for the pipeline."
|
||||
}
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"sourceType": "AzureStorageBlobContainer",
|
||||
"systemIdentity": {
|
||||
"type": "SystemAssigned"
|
||||
},
|
||||
"userIdentity": {
|
||||
"type": "UserAssigned",
|
||||
"userAssignedIdentities": {
|
||||
"[parameters('userAssignedIdentity')]": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.ContainerRegistry/registries",
|
||||
"apiVersion": "2019-12-01-preview",
|
||||
"name": "[parameters('registryName')]",
|
||||
"location": "[parameters('location')]",
|
||||
"comments": "Container registry for storing docker images",
|
||||
"tags": {
|
||||
"displayName": "Container Registry",
|
||||
"container.registry": "[parameters('registryName')]"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Premium",
|
||||
"tier": "Premium"
|
||||
},
|
||||
"properties": {
|
||||
"adminUserEnabled": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Microsoft.ContainerRegistry/registries/importPipelines/",
|
||||
"name": "[concat(parameters('registryName'), '/', parameters('importPipelineName'))]",
|
||||
"location": "[parameters('location')]",
|
||||
"apiVersion": "2019-12-01-preview",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.ContainerRegistry/registries', parameters('registryName'))]"
|
||||
],
|
||||
"identity": "[if(not(empty(parameters('userAssignedIdentity'))), variables('userIdentity'), variables('systemIdentity'))]",
|
||||
"properties": {
|
||||
"source": {
|
||||
"type": "[variables('sourceType')]",
|
||||
"uri": "[parameters('sourceUri')]",
|
||||
"keyVaultUri": "[parameters('keyVaultUri')]"
|
||||
},
|
||||
"trigger": {
|
||||
"sourceTrigger": {
|
||||
"status": "[parameters('sourceTriggerStatus')]"
|
||||
}
|
||||
},
|
||||
"options": "[parameters('options')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"registryName": {
|
||||
"value": "myregistry"
|
||||
},
|
||||
"importPipelineName": {
|
||||
"value": "myImportPipeline"
|
||||
},
|
||||
"sourceUri": {
|
||||
"value": "https://accountname.blob.core.windows.net/containername"
|
||||
},
|
||||
"keyVaultUri": {
|
||||
"value": "https://myvault.vault.azure.net/secrets/acrimportsas"
|
||||
},
|
||||
"options": {
|
||||
"value": [
|
||||
"OverwriteTags",
|
||||
"DeleteSourceBlobOnSuccess",
|
||||
"ContinueOnErrors"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"location": {
|
||||
"type": "string",
|
||||
"defaultValue": "[resourceGroup().location]",
|
||||
"metadata": {
|
||||
"description": "Location for all resources."
|
||||
}
|
||||
},
|
||||
"registryName": {
|
||||
"type": "string",
|
||||
"minLength": 5,
|
||||
"maxLength": 50,
|
||||
"metadata": {
|
||||
"description": "Name of your Azure Container Registry"
|
||||
}
|
||||
},
|
||||
"pipelineRunName": {
|
||||
"type": "string",
|
||||
"minLength": 5,
|
||||
"maxLength": 50,
|
||||
"metadata": {
|
||||
"description": "Name of your pipeline run."
|
||||
}
|
||||
},
|
||||
"pipelineResourceId": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The resource ID of the pipeline to run."
|
||||
}
|
||||
},
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"metadata": {
|
||||
"description": "List of source artifacts to be transferred by the pipeline."
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"sourceName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The source URI of the export pipeline."
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"targetName": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The key vault secret uri to obtain the source storage SAS token."
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"catalogDigest": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "The digest of the tar used to transfer the artifacts."
|
||||
},
|
||||
"defaultValue": ""
|
||||
},
|
||||
"forceUpdateTag": {
|
||||
"type": "string",
|
||||
"metadata": {
|
||||
"description": "How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed."
|
||||
},
|
||||
"defaultValue": ""
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
"transferType": "AzureStorageBlob"
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"type": "Microsoft.ContainerRegistry/registries/pipelineRuns/",
|
||||
"name": "[concat(parameters('registryName'), '/', parameters('pipelineRunName'))]",
|
||||
"location": "[parameters('location')]",
|
||||
"apiVersion": "2019-12-01-preview",
|
||||
"properties": {
|
||||
"request": {
|
||||
"pipelineResourceId": "[parameters('pipelineResourceId')]",
|
||||
"artifacts": "[parameters('artifacts')]",
|
||||
"source": {
|
||||
"type": "[if(not(empty(parameters('sourceName'))), variables('transferType'), '']",
|
||||
"name": "[parameters('sourceName')]"
|
||||
},
|
||||
"target": {
|
||||
"type": "[if(not(empty(parameters('targetName'))), variables('transferType'), '')]",
|
||||
"name": "[parameters('targetName')]"
|
||||
},
|
||||
"catalogDigest": "[parameters('catalogDigest')]"
|
||||
},
|
||||
"forceUpdateTag": "[parameters('forceUpdateTag')]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"registryName": {
|
||||
"value": "myregistry"
|
||||
},
|
||||
"pipelineRunName": {
|
||||
"value": "myPipelineRun"
|
||||
},
|
||||
"pipelineResourceId": {
|
||||
"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/exportPipelines/myExportPipeline"
|
||||
},
|
||||
"targetName": {
|
||||
"value": "myblob"
|
||||
},
|
||||
"artifacts": {
|
||||
"value": [
|
||||
"hello-world:latest",
|
||||
"sourceRepository@sha256:0000000000000000000000000000000000000000000000000000000000000000"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
See public docs: https://aks.ms/acr/transfer.
|
Загрузка…
Ссылка в новой задаче