From 8018ebc7939887216a3b74fbbdeca80dca5d732e Mon Sep 17 00:00:00 2001 From: "Brian Moore (AZURE RESOURCE MANAGER)" Date: Tue, 16 Jul 2019 13:39:10 -0500 Subject: [PATCH] adding pipeline artifacts --- test/ci-gen-setup/.config.json | 53 ++ test/pipeline/README.md | 31 + ...json => pipeline.import.azure.master.json} | 175 ++--- test/pipeline/pipeline.import.fork.json | 651 ++++++++++++++++++ 4 files changed, 809 insertions(+), 101 deletions(-) create mode 100644 test/ci-gen-setup/.config.json create mode 100644 test/pipeline/README.md rename test/pipeline/{azure-quickstarts-pipeline.json => pipeline.import.azure.master.json} (71%) create mode 100644 test/pipeline/pipeline.import.fork.json diff --git a/test/ci-gen-setup/.config.json b/test/ci-gen-setup/.config.json new file mode 100644 index 000000000000..154b611cfa59 --- /dev/null +++ b/test/ci-gen-setup/.config.json @@ -0,0 +1,53 @@ +{ + "READ_ME": "This file cotains the values for 'GEN' Parameters used in the pipeline. These values WILL NOT WORK in your own pipeline. Values that require only 'data' can usually be used as-is. Any value referencing a resource will require a resource to be created in the subscription templates will be deployed to. It should go without saying that you should not use any of these secrets, certs or data in a non-test environment. You can generate some of your own values using the scripts in the repo. Also note that the values in this file are static values. Values that are generated each time like passwords are handled in the Gen-TemplateParameters.ps1 script.", + "READ_ME_NOTE": "When setting up your own pipeline, you only need to populate the values you want to use. For example, if you're not testing templates that use VHDs, you don't need to store the vhd's and can leave that part out of the file.", + "READ_ME_ACCESS": "You'll need to make sure the princiapl deploying template has the appropriate access to any artifacts stored in Azure and used here.", + + "SECTION1": "These vales must be populated manually, they are not generated by Create-GEN-Artifacts.ps1", + + "AZUREAD_Comments": "Object ID of a principal used for granting access, can be the principal of the Service Principal running automation (and replaced by the template function when it's in prod)", + "AZUREAD-OBJECTID": "aa0bb455-b949-460c-a1c0-257abae465ef", + + "SSH-PUB-KEY": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKMNCI5ClfpHa4lGcFbxg4boSWYyWQ0EwUUAjL17VEXR5CUtNslfwjhkg8mi2Y8K9fkducLYerEgJHpiheFM2ltw1HZat8coIBgh7w3EDtWkjdyk9/CNcrufAE47pRjN4YXVhZW1zUgFORH3AmxLqOXtdMCTOYdzZKaBXa60SUVKd44tRrGQW9vl7SFm+bsgX3mY02HMlxOBZcm65Nn4mLC9h0QdpUsPvU0V2H23yD8Nz3ul1qm6BeuaUtP3mRrcp5hC5+eCQOiJbQp5hXlZEn1Q/TyCP0uKhsUf+hNhZueozFKDSnxa6bMXjkfY5a5J4jQDakDd2RkxYPEnK2s7pf", + + "VHD_Comments": "VHD Blobs - current samples work with Windows OS, need one for Generalized, Specialized and a Data Disk", + "VHDRESOURCEGROUP-NAME": "ttk-gen-artifacts", + "VHDSTORAGEACCOUNT-NAME" : "azbotstorage", + "SPECIALIZED-WINVHD-URI": "https://azbotstorage.blob.core.windows.net/vhds/existingspecwinvm.vhd", + "GENERALIZED-WINVHD-URI" : "https://azbotstorage.blob.core.windows.net/vhds/existinggenwinvm.vhd", + "DATAVHD-URI" : "https://azbotstorage.blob.core.windows.net/vhds/existingdatadisk.vhd", + "BACPAC-URI": "https://azbotstorage.blob.core.windows.net/bacpacs/AdventureWorks2016.bacpac", + + "CUSTOM_Comments": "A custom domain and corresponding certificate values. These must be valid (i.e. a real cert for the domain) and should not be considered secret.", + "CUSTOM-FQDN-NAME": "armvalidator17384.spektrademos.com", + "CUSTOM-WEBAPP-NAME": "armvalidator17384", + "CUSTOM-DOMAIN-SSLCERT-PASSWORD": "Dj4EqnZrp", + "CUSTOM-DOMAIN-SSLCERT-THUMBPRINT": "6c7788b9de5c17596da6e167223531976671242b", + "CUSTOM-DOMAIN-SSLCERT-PFXDATA": "-----BEGIN CERTIFICATE----- MIIDLTCCAhWgAwIBAgIJAOBkaAqnyXLQMA0GCSqGSIb3DQEBBQUAMC0xKzApBgNVBAMMImFybXZhbGlkYXRvcjE3Mzg0LnNwZWt0cmFkZW1vcy5jb20wHhcNMTcwOTAxMjIwOTI0WhcNMjcwODMwMjIwOTI0WjAtMSswKQYDVQQDDCJhcm12YWxpZGF0b3IxNzM4NC5zcGVrdHJhZGVtb3MuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2datWzcxlB93Y/ZxL+LbreT6r/RF5Z7bJBBTfao+zF7NVm9umLSxfuIcGeMbBoTqXB2vClvOFHlWQ/WWXymrdWg4907PCs7Lv72AV12xSX3XCH94PHo15CieZsYNs39V64n4UUB9xHxGr7Hk/3PPt/dN7Poi2wuCHpJNq+A2j30raN+wHSzhaxs2cohPdy51QHqO0jjCzM/JENPX6Inb0QbojO8tKNpboYh5ebdLrIEQT4S1yqc0ock2t/HXfSlBK6//mhyajLqBjWBRY13iGMltz8qDm/anHk9d4U1cMlUYDp1KtyHqOOMm+ton4EdXCX2pEzwhF9exCGDutgttYwIDAQABo1AwTjAdBgNVHQ4EFgQUO9/KNW1TetsKkekopoZ91Gw0HiIwHwYDVR0jBBgwFoAUO9/KNW1TetsKkekopoZ91Gw0HiIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeHV6tdvSSoOU/NGeMuAAC/cIVl67LUc2Gpbzp0XJPSkFijEl2Me5KqULhz43JfBI0c7BR+WoMWAoIMT0tfF0y0yodz8wXSAbtNTRk2rZZHCgTzTu8zvisPVou02yqYWQVNasjYjXWawsUv4w+Ap00zcqxt7zES6e9WXjia07rnIye6V/nD6j6METivucjS5Be8KWvVTNn5lH7PEip9VxWoAPfcHgIj4iECcira/poJXPnxGUl5A7khMj59xrs5T4G7GlC/cgB7lK2/eBV18ZpPipJIDrw7PVlY+Q5r/j2URWYCQ8Hu6J0kvPChhffSGvUEvUSsxqVPsLtUkDf3YiVQ== -----END CERTIFICATE-----", + + "SECTION2": "These values and the resources behind them can be generated using Create-GEN-Artifacts.ps1. The values checked into master WILL NOT WORK in your own subscription/repo, they are unique to each subscription.", + + "VNET-RESOURCEGROUP-NAME": "ttk-gen-artifacts", + "VNET-NAME": "azbot-vnet", + "VNET-SUBNET1-NAME": "azbot-subnet-1", + "KEYVAULT-NAME": "azbotvault", + "KEYVAULT-RESOURCEGROUP-NAME": "ttk-gen-artifacts", + "KEYVAULT-PASSWORD-SECRET-NAME": "notSecretPassword", + "KEYVAULT-SUBSCRIPTION-ID": "0cec7090-2e08-4498-9337-eb96ade50821", + "KEYVAULT-RESOURCE-ID": "/subscriptions/0cec7090-2e08-4498-9337-eb96ade50821/resourceGroups/ttk-gen-artifacts/providers/Microsoft.KeyVault/vaults/azbotvault", + "SF-CERT-URL": "https://azbotvault.vault.azure.net:443/secrets/azbot-sf-cert/914b53c4adf541ef86195130f5d73840", + "SF-CERT-THUMBPRINT": "416E53BC918A4282311D45AC30B905201F42866E", + "KEYVAULT-ENCRYPTION-KEY": "azbot-diskkey", + "KEYVAULT-ENCRYPTION-KEY-URI": "https://azbotvault.vault.azure.net:443/keys/azbot-diskkey/68b75e8687554c4882d7c5ac6bc51364", + "KEYVAULT-ENCRYPTION-KEY-VERSION": "68b75e8687554c4882d7c5ac6bc51364", + "KEYVAULT-SSL-SECRET-NAME": "azbot-ssl-cert", + "KEYVAULT-SSL-SECRET-URI": "https://azbotvault.vault.azure.net:443/certificates/azbot-ssl-cert/7d7c555fa6ce49a98866a76aff323dd8", + "SELFSIGNED-CERT-PFXDATA": "MIIKQgIBAzCCCf4GCSqGSIb3DQEHAaCCCe8EggnrMIIJ5zCCBgAGCSqGSIb3DQEHAaCCBfEEggXtMIIF6TCCBeUGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAjZv6WVU+miugICB9AEggTYwgzQOTEQ1NGW+JYBhwM26kGjm87o5cPS7ClCQjaxLgLmXVHHVW1WqUtlUUgUSQCeHMymMfoPgzjWyAGjRBEz8LNlVG6KSzu4gXZMMywwkyL6EG1IFs6qMJJoMFVqmX0ULgCKtvSWH9AlFY+6fgZ9ZwGt2IFytoGUcABiCHlxqyiDkZwaNta4wt3H4+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FSIGNED-CERT-PASSWORD": "cI#2ee36621-654d-485", + "SELFSIGNED-CERT-THUMBPRINT": "416E53BC918A4282311D45AC30B905201F42866E", + "SELFSIGNED-CERT-DNSNAME": "azbot-cert-dns", + + "SECTION3": "End of the values" +} diff --git a/test/pipeline/README.md b/test/pipeline/README.md new file mode 100644 index 000000000000..5a74fb78286f --- /dev/null +++ b/test/pipeline/README.md @@ -0,0 +1,31 @@ +# Setting Up Your Own CI/CD Pipeline in Azure DevOps + +A bit terse for now, but if you want to set up your own AzDO pipeline here are the steps. Please update this file if you find something missing or unclear. + +## After Exporting the Pipeline + +You can skip this section if you just need to import a pipeline. + +- remove "options" property (if present) +- remove "_links" property +- set "badgeEnabled" property to false (doesn't make sense for this repo) +- remove the "queue" property + +## Before Importing the Pipeline + +Before importing the JSON file do the following: + +- Set the project.id property to the guid of the project the pipeline is being imported into - the easiest way to get that is to create an empty pipeline, export it and look for the project.id property value +- If you forget to do this, the error message in AzDO will also show your project.id but you have to start the import over to fix it + +## Importing the Pipeline + +After importing, and before saving the pipeline you'll need to do the following: + +- Change the name of the pipeline as needed +- Set the agent pool (currently we use Windows Containers) +- Set the repo to run the pipeline on (we use the master branch) +- Remove debug tasks if you don't want them +- Update the "Download Template Toolkit Release" task (should be the first one) to use the correct connection (and repo if needed) +- Set variable values, you need ids and secrets for the Service Principals, the others that need updating will have placeholder text +- Set the appropriate triggers, but default this runs on PRs to master and shares secrets. The secrets cannot be exposed unless you do something to expose them. diff --git a/test/pipeline/azure-quickstarts-pipeline.json b/test/pipeline/pipeline.import.azure.master.json similarity index 71% rename from test/pipeline/azure-quickstarts-pipeline.json rename to test/pipeline/pipeline.import.azure.master.json index 53ddb673032a..3a24b5c4716e 100644 --- a/test/pipeline/azure-quickstarts-pipeline.json +++ b/test/pipeline/pipeline.import.azure.master.json @@ -1,27 +1,4 @@ { - "options": [ - { - "enabled": false, - "definition": { - "id": "5d58cc01-7c75-450c-be18-a388ddb129ec" - }, - "inputs": { - "branchFilters": "[\"+refs/heads/*\"]", - "additionalFields": "{}" - } - }, - { - "enabled": false, - "definition": { - "id": "a9db38f9-9fdc-478c-b0f9-464221e58316" - }, - "inputs": { - "workItemType": "Bug", - "assignToRequestor": "true", - "additionalFields": "{}" - } - } - ], "triggers": [ { "branchFilters": [ @@ -41,10 +18,10 @@ ], "variables": { "app.id": { - "value": "" + "value": "244790b2-d023-403d-8814-b4ecfe847e55" }, "app.id.admin": { - "value": "" + "value": "05ff27fb-fcd2-4bae-97ee-4e60a67ff73b" }, "app.secret": { "value": null, @@ -55,7 +32,7 @@ "isSecret": true }, "config.file.uri": { - "value": "uri to the .config.json file that contains GEN values for the subscription used for test deployments" + "value": "https://azbotstorage.blob.core.windows.net/gen-artifacts-config/.config.json?st=2019-07-08T15%3A34%3A11Z&se=2029-07-09T15%3A34%3A00Z&sp=rl&sv=2018-03-28&sr=c&sig=2lONV85wm%2FFJ8zK89NoZ3QmkEjNBgqD3IIX9wUiseAI%3D" }, "gen.parameters.filename": { "value": "gen.azuredeploy.parameters.json" @@ -64,7 +41,7 @@ "value": "gen.prereq.parameters.json" }, "location": { - "value": "" + "value": "westus" }, "mainTemplate.deployment.name": { "value": "mainTemplate-deployment" @@ -75,24 +52,27 @@ "prereq.outputs.filename": { "value": "prereq.outputs.json" }, + "prereq.resourceGroup.name": { + "value": "" + }, "resourceGroup.name": { - "value": "" + "value": "" }, "sample.folder": { - "value": "" + "value": "" }, "skipComponentGovernanceDetection": { "value": "true" }, "subscription.id": { - "value": "" + "value": "0cec7090-2e08-4498-9337-eb96ade50821" }, "system.debug": { "value": "false", "allowOverride": true }, "tenant.id": { - "value": "" + "value": "6457d1f2-4394-4fc2-b163-e46ffcbbec5c" }, "ttk.asset.filename": { "value": "AzTemplateToolKit.zip" @@ -120,8 +100,9 @@ "properties": {}, "tags": [], "jobAuthorizationScope": 1, - "jobTimeoutInMinutes": 60, + "jobTimeoutInMinutes": 360, "jobCancelTimeoutInMinutes": 5, + "badgeEnabled": false, "process": { "phases": [ { @@ -140,8 +121,8 @@ "definitionType": "task" }, "inputs": { - "connection": "d49d0a9d-09e7-4ac4-a95e-176b3df35bdc", - "userRepository": "bmoore-msft/azure-quickstart-templates", + "connection": "d6ab5960-0304-494e-90fd-d42c7ed2cfbd", + "userRepository": "Azure/azure-quickstart-templates", "defaultVersionType": "latest", "version": "", "itemPattern": "$(ttk.asset.filename)", @@ -190,7 +171,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)\\ci-scripts\\Get-SampleFolder.ps1", "arguments": "", - "script": "#Get the folder of the sample in this PR and generate the resourceGroup name\n\nWrite-Host \"##vso[task.setvariable variable=sample.folder]101-application-gateway-create\"\n\n$resourceGroupName = \"azdo-$(New-Guid)\"\nWrite-Host \"##vso[task.setvariable variable=resourceGroup.name]$resourceGroupName\"\n\n<#\n101-application-gateway-public-ip\n101-application-gateway-public-ip-ssl-offload\n101-application-gateway-redirect\n101-application-gateway-rewrite\n101-application-gateway-v2-autoscale-create\n101-application-gateway-waf\n101-app-service-certificate-standard\n101-app-service-certificate-wildcard\n101-automation-configuration\n101-automation-runbook-getvms\n101-availability-set-create-3FDs-20UDs\n101-azure-api-management-create\n101-azure-database-migration-service\n101-azure-dns-new-zone\n101-azurefirewall-create\n101-azurefirewall-sandbox\n101-azurepolicy-assign-builtinpolicy-resourcegroup\n101-azure-relay-create-namespace\n101-azure-search-create\n101-backup-oms-monitoring\n101-backup-protect-iaasvm\n101-backup-vault-create\n101-batchaccount-with-storage\n101-batch-with-keyvault-pfx-password\n101-cdn-with-custom-origin\n101-cognitive-services-Computer-vision-API\n101-cognitive-services-translate\n101-container-registry\n101-container-registry-geo-replication\n101-cosmosdb-api-for-mongodb-account-create\n101-cosmosdb-create-account\n101-cosmosdb-create-arm-template\n101-cosmosdb-create-multi-region-account\n101-create-ase-with-webapp\n101-databricks-all-in-one-template-for-vnet-injection\n101-databricks-nsg-for-vnet-injection\n101-databricks-vnet-for-vnet-injection\n101-databricks-workspace\n101-databricks-workspace-with-custom-vnet-address\n101-databricks-workspace-with-vnet-injection\n101-data-factory-blob-to-sql-copy\n101-data-factory-blob-to-sql-copy-stored-proc\n101-data-factory-chained-copy-activities\n101-data-factory-hive-transformation\n101-data-factory-salesforce-to-blob-copy\n101-data-factory-v2-blob-to-blob-copy\n101-data-factory-v2-blob-to-sql-copy\n101-data-factory-v2-onprem-sql-to-blob-copy\n101-data-factory-v2-provision-ssis-runtime\n101-data-factory-v2-transform-using-spark\n101-data-lake-analytics\n101-data-lake-store-encryption-adls\n101-data-lake-store-encryption-key-vault\n101-data-lake-store-no-encryption\n101-DDoS-Attack-Prevention\n101-default-shared-dashboard\n101-documentdb-account-consistencypolicy-create\n101-documentdb-account-create\n101-dtl-create-lab\n101-event-grid\n101-event-grid-cloudevents\n101-event-grid-event-hubs-handler\n101-event-grid-resource-events-to-webhook\n101-event-grid-subscription-and-storage\n101-expressroute-circuit-create\n101-front-door-create-basic\n101-front-door-create-multiple-backends\n101-front-door-custom-domain\n101-front-door-geo-filtering\n101-function-app-create-dedicated\n101-function-app-create-dynamic\n101-hdinsight-hbase-enhancedwrite\n101-hdinsight-hbase-linux\n101-hdinsight-hbase-linux-vnet\n101-hdinsight-hbase-replication-geo\n101-hdinsight-hbase-replication-one-vnet\n101-hdinsight-hbase-replication-two-vnets-same-region\n101-hdinsight-interactive-hive\n101-hdinsight-kafka\n101-hdinsight-linux-add-edge-node\n101-hdinsight-linux-ssh-password\n101-hdinsight-linux-ssh-publickey\n101-hdinsight-linux-ssh-publickey-metastore-vnet\n101-hdinsight-linux-with-edge-node\n101-hdinsight-linux-with-existing-default-storage-account\n101-hdinsight-linux-with-existing-linked-storage-account\n101-hdinsight-linux-with-sql-database\n101-hdinsight-rserver\n101-hdinsight-secure-vnet\n101-hdinsight-spark-linux\n101-hdinsight-spark-linux-vnet\n101-hub-and-spoke-sandbox\n101-integrationpatterns-messagerouter-logicapp\n101-integrationpatterns-messagerouter-servicebus\n101-internal-loadbalancer-create\n101-iothub-with-consumergroup-create\n101-jenkins\n101-jenkins-with-ssh-public-key\n101-keyvault-add-access-policy\n101-key-vault-create\n101-kusto-cluster-database\n101-loadbalancer-with-multivip\n101-loadbalancer-with-nat-rule\n101-logic-app-and-function-app\n101-logic-app-create\n101-logic-app-ftp-to-blob\n101-logic-app-sendgrid\n101-logic-app-sql-proc\n101-machine-learning-create\n101-managed-mysql-with-vnet\n101-media-services-create\n101-mobile-app-create\n101-mutiple-vms-with-data-management-gateway\n101-networkwatcher-create\n101-nic-publicip-dns-vnet\n101-point-to-site\n101-powerbi-workspace-create\n101-rbac-builtinrole-resourcegroup\n101-rbac-builtinrole-virtualmachine\n101-recovery-services-backup-vms\n101-recovery-services-create-vault-enable-diagnostics\n101-recovery-services-create-vm-and-configure-backup\n101-recovery-services-daily-backup-policy-create\n101-recovery-services-vault-create\n101-recovery-services-weekly-backup-policy-create\n101-redis-cache\n101-scheduler-service-bus\n#>", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -198,31 +179,6 @@ "workingDirectory": "" } }, - { - "environment": {}, - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "DEBUG: Dump Vars", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "2.*", - "definitionType": "task" - }, - "inputs": { - "targetType": "inline", - "filePath": "", - "arguments": "", - "script": "Write-Host \"Dump SubId: $(subscription.id)\"\nWrite-Host \"Dump RG: $(resourceGroup.name)\"\nWrite-Host \"Dump Folder: $(sample.folder)\"\n\n\n", - "errorActionPreference": "stop", - "failOnStderr": "false", - "ignoreLASTEXITCODE": "false", - "pwsh": "false", - "workingDirectory": "" - } - }, { "environment": {}, "enabled": true, @@ -290,7 +246,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/ConnectTo-Azure.ps1", "arguments": "-appId $(app.id.admin) -secret $(app.secret.admin) -tenantId $(tenant.id) -subscriptionId $(subscription.id) -InstallAzModule", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -314,8 +270,8 @@ "inputs": { "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/Create-ResourceGroupAssignment.ps1", - "arguments": "-ResourceGroupName \"$(resourceGroup.name)\" -Location $(location) -appId $(app.id) -objectId $(app.object.id)", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "arguments": "-ResourceGroupName \"$(resourceGroup.name)\" -Location $(location) -appId $(app.id)", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -339,8 +295,8 @@ "inputs": { "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/Create-ResourceGroupAssignment.ps1", - "arguments": "-ResourceGroupName \"$(resourceGroup.name)-prereqs\" -Location $(location) -appId $(app.id) -objectId $(app.object.id)", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "arguments": "-ResourceGroupName \"$(prereq.resourceGroup.name)\" -Location $(location) -appId $(app.id)", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -365,7 +321,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/ConnectTo-Azure.ps1", "arguments": "-appId $(app.id) -secret $(app.secret) -tenantId $(tenant.id) -subscriptionId $(subscription.id)", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -390,7 +346,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/Gen-TemplateParameters.ps1", "arguments": "-configUri \"$(config.file.uri)\" -TemplateParametersFile \"$(sample.folder)\\prereqs\\prereq.azuredeploy.parameters.json\" -NewTemplateParametersFile \"$(sample.folder)\\prereqs\\$(gen.prereq.parameters.filename)\"", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -414,8 +370,8 @@ "inputs": { "targetType": "filePath", "filePath": "$(ttk.folder)\\Deploy-AzTemplate.ps1", - "arguments": "-ArtifactStagingDirectory \"$(sample.folder)\\prereqs\" -Location \"$(Location)\" -ResourceGroupName \"$(resourceGroup.name)\" -TemplateParametersFile \"$(sample.folder)\\prereqs\\$(gen.prereq.parameters.filename)\" -DeploymentName \"$(prereq.deployment.name)\" -TemplateFile \"$(sample.folder)\\prereqs\\prereq.azuredeploy.json\"", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "arguments": "-ArtifactStagingDirectory \"$(sample.folder)\\prereqs\" -Location \"$(Location)\" -ResourceGroupName \"$(prereq.resourceGroup.name)\" -TemplateParametersFile \"$(sample.folder)\\prereqs\\$(gen.prereq.parameters.filename)\" -DeploymentName \"$(prereq.deployment.name)\" -TemplateFile \"$(sample.folder)\\prereqs\\prereq.azuredeploy.json\"", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -440,7 +396,7 @@ "targetType": "inline", "filePath": "", "arguments": "", - "script": "$PreReqOutputs = (Get-AzResourceGroupDeployment -ResourceGroupName $(resourceGroup.name) -Name $(prereq.deployment.name)).Outputs | ConvertTo-Json\nWrite-Host \"$PreReqOutputs\"\n\n###Write-Output \"##vso[task.setvariable variable=prereq.config.json]$PreReqOutputs\"\n\n$PreReqOutputs | Out-File -FilePath \"$(sample.folder)\\prereqs\\$(prereq.outputs.filename)\"", + "script": "$PreReqOutputs = (Get-AzResourceGroupDeployment -ResourceGroupName \"$(prereq.resourceGroup.name)\" -Name $(prereq.deployment.name)).Outputs | ConvertTo-Json\nWrite-Host \"$PreReqOutputs\"\n\n###Write-Output \"##vso[task.setvariable variable=prereq.config.json]$PreReqOutputs\"\n\n$PreReqOutputs | Out-File -FilePath \"$(sample.folder)\\prereqs\\$(prereq.outputs.filename)\"", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -490,7 +446,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/Gen-TemplateParameters.ps1", "arguments": "-configUri \"$(config.file.uri)\" -TemplateParametersFile \"$(sample.folder)\\azuredeploy.parameters.json\" -NewTemplateParametersFile \"$(sample.folder)\\$(gen.parameters.filename)\" -prereqOutputsFileName \"$(sample.folder)\\prereqs\\$(prereq.outputs.filename)\"", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -540,7 +496,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)\\Deploy-AzTemplate.ps1", "arguments": "-ArtifactStagingDirectory \"$(sample.folder)\" -Location \"$(Location)\" -ResourceGroupName \"$(resourceGroup.name)\" -TemplateParametersFile \"$(sample.folder)\\$(gen.parameters.filename)\" -DeploymentName \"$(mainTemplate.deployment.name)\"", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -555,7 +511,7 @@ "alwaysRun": false, "displayName": "Connect To Azure (Admin) To Clean Up", "timeoutInMinutes": 0, - "condition": "succeeded()", + "condition": "always()", "task": { "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", "versionSpec": "2.*", @@ -565,7 +521,7 @@ "targetType": "filePath", "filePath": "$(ttk.folder)/ci-scripts/ConnectTo-Azure.ps1", "arguments": "-appId $(app.id.admin) -secret $(app.secret.admin) -tenantId $(tenant.id) -subscriptionId $(subscription.id)", - "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -602,20 +558,20 @@ "environment": {}, "enabled": true, "continueOnError": false, - "alwaysRun": true, + "alwaysRun": false, "displayName": "Clean Up ResourceGroup (mainTemplate)", "timeoutInMinutes": 0, - "condition": "succeededOrFailed()", + "condition": "always()", "task": { "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", "versionSpec": "2.*", "definitionType": "task" }, "inputs": { - "targetType": "inline", - "filePath": "", - "arguments": "", - "script": "Remove-AzResourceGroup -Name \"$(resourceGroup.Name)\" -Force -Verbose\n", + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Kill-AzResourceGroup.ps1", + "arguments": "-ResourceGroupName \"$(resourceGroup.name)\"", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -630,17 +586,17 @@ "alwaysRun": false, "displayName": "Clean Up ResourceGroup (prereqs)", "timeoutInMinutes": 0, - "condition": "eq(variables['deploy.prereqs'], 'true')", + "condition": "and(always(), eq(variables['deploy.prereqs'], 'true'))", "task": { "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", "versionSpec": "2.*", "definitionType": "task" }, "inputs": { - "targetType": "inline", - "filePath": "", - "arguments": "", - "script": "Remove-AzResourceGroup -Name \"$(resourceGroup.Name)-prereqs\" -Force -Verbose\n\n", + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Kill-AzResourceGroup.ps1", + "arguments": "-ResourceGroupName \"$(prereq.resourceGroup.name)\"", + "script": "", "errorActionPreference": "stop", "failOnStderr": "false", "ignoreLASTEXITCODE": "false", @@ -659,7 +615,8 @@ "allowScriptsAuthAccessOption": false, "type": 1 }, - "jobAuthorizationScope": 1 + "jobAuthorizationScope": 1, + "jobTimeoutInMinutes": 360 } ], "type": 1 @@ -669,13 +626,13 @@ "apiUrl": "https://api.github.com/repos/Azure/azure-quickstart-templates", "branchesUrl": "https://api.github.com/repos/Azure/azure-quickstart-templates/branches", "cloneUrl": "https://github.com/Azure/azure-quickstart-templates.git", - "connectedServiceId": "d49d0a9d-09e7-4ac4-a95e-176b3df35bdc", + "connectedServiceId": "d6ab5960-0304-494e-90fd-d42c7ed2cfbd", "defaultBranch": "master", "fullName": "Azure/azure-quickstart-templates", "hasAdminPermissions": "True", "isFork": "False", "isPrivate": "False", - "lastUpdated": "07/05/2019 20:37:51", + "lastUpdated": "07/15/2019 16:43:12", "manageUrl": "https://github.com/Azure/azure-quickstart-templates", "nodeId": "MDEwOlJlcG9zaXRvcnkzNDQwNzY1MQ==", "ownerId": "6844498", @@ -708,32 +665,48 @@ "quality": 1, "authoredBy": { "displayName": "Brian Moore (AZURE RESOURCE MANAGER)", - "url": "https://app.vssps.visualstudio.com/Aec0b5c4d-d8c6-4ce2-95f7-541aa5095f68/_apis/Identities/a776ea98-0041-458d-a782-55b352492e1e", + "url": "https://app.vssps.visualstudio.com/Ac8aef736-af44-4df8-8ee0-e3f71ba093b7/_apis/Identities/a776ea98-0041-458d-a782-55b352492e1e", "_links": { "avatar": { - "href": "https://bmoore-msft.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk" + "href": "https://dev.azure.com/azurequickstarts/_apis/GraphProfile/MemberAvatars/aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk" } }, "id": "a776ea98-0041-458d-a782-55b352492e1e", "uniqueName": "bmoore@microsoft.com", - "imageUrl": "https://bmoore-msft.visualstudio.com/_apis/GraphProfile/MemberAvatars/aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk", + "imageUrl": "https://dev.azure.com/azurequickstarts/_apis/GraphProfile/MemberAvatars/aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk", "descriptor": "aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk" }, "drafts": [], - "queue": { }, - "id": 15, - "name": "QuickStarts-Az-CI-Public", + "queue": { + "_links": { + "self": { + "href": "https://dev.azure.com/azurequickstarts/_apis/build/Queues/15" + } + }, + "id": 15, + "name": "Hosted Windows Container", + "url": "https://dev.azure.com/azurequickstarts/_apis/build/Queues/15", + "pool": { + "id": 7, + "name": "Hosted Windows Container", + "isHosted": true + } + }, + "id": 5, + "name": "Azure-QuickStart-Templates-Import", "path": "\\", "type": 2, "queueStatus": 0, - "revision": 81, - "createdDate": "2019-07-07T21:58:51.327Z", + "revision": 3, + "createdDate": "2019-07-16T16:11:47.817Z", "project": { - "id": "", - "name": "QuickStarts", + "id": "b191bd7a-37bb-47b0-870c-3f1270a79b3d", + "name": "azure-quickstart-templates", + "description": "Pipelines for the Azure/azure-quickstart-templates repo", + "url": "https://dev.azure.com/azurequickstarts/_apis/projects/b191bd7a-37bb-47b0-870c-3f1270a79b3d", "state": 1, - "revision": 62879213, - "visibility": 0, - "lastUpdateTime": "2019-04-10T20:34:26.580Z" + "revision": 21, + "visibility": 2, + "lastUpdateTime": "2019-07-08T21:54:49.103Z" } } \ No newline at end of file diff --git a/test/pipeline/pipeline.import.fork.json b/test/pipeline/pipeline.import.fork.json new file mode 100644 index 000000000000..180a8430e253 --- /dev/null +++ b/test/pipeline/pipeline.import.fork.json @@ -0,0 +1,651 @@ +{ + "triggers": [ + { + "branchFilters": [ + "+master" + ], + "forks": { + "enabled": true, + "allowSecrets": true + }, + "pathFilters": [ + "-/test/*" + ], + "requireCommentsForNonTeamMembersOnly": false, + "isCommentRequiredForPullRequest": false, + "triggerType": 64 + } + ], + "variables": { + "app.id": { + "value": "" + }, + "app.id.admin": { + "value": "" + }, + "app.secret": { + "value": null, + "isSecret": true + }, + "app.secret.admin": { + "value": null, + "isSecret": true + }, + "config.file.uri": { + "value": "" + }, + "gen.parameters.filename": { + "value": "gen.azuredeploy.parameters.json" + }, + "gen.prereq.parameters.filename": { + "value": "gen.prereq.parameters.json" + }, + "location": { + "value": "" + }, + "mainTemplate.deployment.name": { + "value": "mainTemplate-deployment" + }, + "prereq.deployment.name": { + "value": "prereq-deployment" + }, + "prereq.outputs.filename": { + "value": "prereq.outputs.json" + }, + "prereq.resourceGroup.name": { + "value": "" + }, + "resourceGroup.name": { + "value": "" + }, + "sample.folder": { + "value": "" + }, + "subscription.id": { + "value": "" + }, + "system.debug": { + "value": "false", + "allowOverride": true + }, + "tenant.id": { + "value": "" + }, + "ttk.asset.filename": { + "value": "AzTemplateToolKit.zip" + }, + "ttk.folder": { + "value": "$(Agent.BuildDirectory)\\test" + } + }, + "retentionRules": [ + { + "branches": [ + "+refs/heads/*" + ], + "artifacts": [], + "artifactTypesToDelete": [ + "FilePath", + "SymbolStore" + ], + "daysToKeep": 10, + "minimumToKeep": 1, + "deleteBuildRecord": true, + "deleteTestResults": true + } + ], + "properties": {}, + "tags": [], + "jobAuthorizationScope": 1, + "jobTimeoutInMinutes": 360, + "jobCancelTimeoutInMinutes": 5, + "badgeEnabled": false, + "process": { + "phases": [ + { + "steps": [ + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Download Template Toolkit Release", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "263abc27-4582-4174-8789-af599697778e", + "versionSpec": "0.*", + "definitionType": "task" + }, + "inputs": { + "connection": "00000000-0000-0000-0000-000000000000", + "userRepository": "Azure/azure-quickstart-templates", + "defaultVersionType": "latest", + "version": "", + "itemPattern": "$(ttk.asset.filename)", + "downloadPath": "$(ttk.folder)" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Expand Files TTK Files", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "", + "arguments": "", + "script": "# Expand the TTK files\nGet-ChildItem \"$(ttk.folder)\" -Recurse\n\nWrite-Host \"Expanding files...\"\nExpand-Archive -Path \"$(ttk.folder)\\*.zip\" -DestinationPath \"$(ttk.folder)\" -Verbose\n\nWrite-Host \"Expanded files found:\"\nGet-ChildItem \"$(ttk.folder)\" -Recurse", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Get Folder for Sample & ResourceGroup Name", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)\\ci-scripts\\Get-SampleFolder.ps1", + "arguments": "", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": true, + "alwaysRun": false, + "displayName": "Run Best Practices Tests", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "test/template-tests/Test-AzureRMTemplate.ps1", + "arguments": "-TemplatePath \"$(sample.folder)\"", + "script": "Import-Module $(ttk.folder)/template-tests/AzRMTester.psd1 -Verbose\n\nTest-AzureRMTemplate -TemplatePath \"$(sample.folder)\"\n", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Check for Prereq Deployment", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "", + "arguments": "", + "script": "#checks to see if there are prereqs that need to be deployed and sets the env variable to trigger prereq tasks\n\n$result = Test-Path \"$(sample.folder)\\prereqs\\prereq.azuredeploy.json\"\n\nWrite-Host \"Result: $result\"\n\nWrite-Host \"##vso[task.setvariable variable=deploy.prereqs]$result\"\n\n#Write-Host \"Deploy Prereqs: $(deploy.prereqs)\"\n", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Connect To Azure (Admin) To Create RG", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/ConnectTo-Azure.ps1", + "arguments": "-appId $(app.id.admin) -secret $(app.secret.admin) -tenantId $(tenant.id) -subscriptionId $(subscription.id) -InstallAzModule", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": true, + "alwaysRun": false, + "displayName": "Create ResourceGroup - Assign RBAC (mainTemplate RG)", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Create-ResourceGroupAssignment.ps1", + "arguments": "-ResourceGroupName \"$(resourceGroup.name)\" -Location $(location) -appId $(app.id)", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": true, + "alwaysRun": false, + "displayName": "Create ResourceGroup - Assign RBAC (prereqs RG) ", + "timeoutInMinutes": 0, + "condition": "and(succeeded(), eq(variables['deploy.prereqs'], 'true'))", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Create-ResourceGroupAssignment.ps1", + "arguments": "-ResourceGroupName \"$(prereq.resourceGroup.name)\" -Location $(location) -appId $(app.id)", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Connect To Azure (non-Admin) To Deploy", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/ConnectTo-Azure.ps1", + "arguments": "-appId $(app.id) -secret $(app.secret) -tenantId $(tenant.id) -subscriptionId $(subscription.id)", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "GEN Parameters (Prereqs)", + "timeoutInMinutes": 0, + "condition": "and(succeeded(), eq(variables['deploy.prereqs'], 'true'))", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Gen-TemplateParameters.ps1", + "arguments": "-configUri \"$(config.file.uri)\" -TemplateParametersFile \"$(sample.folder)\\prereqs\\prereq.azuredeploy.parameters.json\" -NewTemplateParametersFile \"$(sample.folder)\\prereqs\\$(gen.prereq.parameters.filename)\"", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Deploy Template (prereqs)", + "timeoutInMinutes": 0, + "condition": "and(succeeded(), eq(variables['deploy.prereqs'], 'true'))", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)\\Deploy-AzTemplate.ps1", + "arguments": "-ArtifactStagingDirectory \"$(sample.folder)\\prereqs\" -Location \"$(Location)\" -ResourceGroupName \"$(prereq.resourceGroup.name)\" -TemplateParametersFile \"$(sample.folder)\\prereqs\\$(gen.prereq.parameters.filename)\" -DeploymentName \"$(prereq.deployment.name)\" -TemplateFile \"$(sample.folder)\\prereqs\\prereq.azuredeploy.json\"", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Dump Outputs To File (prereqs)", + "timeoutInMinutes": 0, + "condition": "and(succeeded(), eq(variables['deploy.prereqs'], 'true'))", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "", + "arguments": "", + "script": "$PreReqOutputs = (Get-AzResourceGroupDeployment -ResourceGroupName \"$(prereq.resourceGroup.name)\" -Name $(prereq.deployment.name)).Outputs | ConvertTo-Json\nWrite-Host \"$PreReqOutputs\"\n\n###Write-Output \"##vso[task.setvariable variable=prereq.config.json]$PreReqOutputs\"\n\n$PreReqOutputs | Out-File -FilePath \"$(sample.folder)\\prereqs\\$(prereq.outputs.filename)\"", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "DEBUG: Dump Prereqs Output File", + "timeoutInMinutes": 0, + "condition": "and(succeeded(), eq(variables['deploy.prereqs'], 'true'))", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "", + "arguments": "", + "script": "Write-Host (Get-Content \"$(sample.folder)\\prereqs\\$(prereq.outputs.filename)\" -Raw)\n", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "GEN mainTemplate Params", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Gen-TemplateParameters.ps1", + "arguments": "-configUri \"$(config.file.uri)\" -TemplateParametersFile \"$(sample.folder)\\azuredeploy.parameters.json\" -NewTemplateParametersFile \"$(sample.folder)\\$(gen.parameters.filename)\" -prereqOutputsFileName \"$(sample.folder)\\prereqs\\$(prereq.outputs.filename)\"", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "DEBUG: dump mainTemplate param file content", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "", + "arguments": "", + "script": "Write-Host (Get-Content \"$(sample.folder)\\$(gen.parameters.filename)\" -Raw)", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Deploy mainTemplate", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)\\Deploy-AzTemplate.ps1", + "arguments": "-ArtifactStagingDirectory \"$(sample.folder)\" -Location \"$(Location)\" -ResourceGroupName \"$(resourceGroup.name)\" -TemplateParametersFile \"$(sample.folder)\\$(gen.parameters.filename)\" -DeploymentName \"$(mainTemplate.deployment.name)\"", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Connect To Azure (Admin) To Clean Up", + "timeoutInMinutes": 0, + "condition": "always()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/ConnectTo-Azure.ps1", + "arguments": "-appId $(app.id.admin) -secret $(app.secret.admin) -tenantId $(tenant.id) -subscriptionId $(subscription.id)", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Write Test Result for README.MD", + "timeoutInMinutes": 0, + "condition": "succeeded()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "inline", + "filePath": "", + "arguments": "", + "script": "<#\n\nThis is a placeholder - for when we want to write the last test result to the readme file\n\n#>", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "false", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Clean Up ResourceGroup (mainTemplate)", + "timeoutInMinutes": 0, + "condition": "always()", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Kill-AzResourceGroup.ps1", + "arguments": "-ResourceGroupName \"$(resourceGroup.name)\"", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + }, + { + "environment": {}, + "enabled": true, + "continueOnError": false, + "alwaysRun": false, + "displayName": "Clean Up ResourceGroup (prereqs)", + "timeoutInMinutes": 0, + "condition": "and(always(), eq(variables['deploy.prereqs'], 'true'))", + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "versionSpec": "2.*", + "definitionType": "task" + }, + "inputs": { + "targetType": "filePath", + "filePath": "$(ttk.folder)/ci-scripts/Kill-AzResourceGroup.ps1", + "arguments": "-ResourceGroupName \"$(prereq.resourceGroup.name)\"", + "script": "", + "errorActionPreference": "stop", + "failOnStderr": "false", + "ignoreLASTEXITCODE": "false", + "pwsh": "true", + "workingDirectory": "" + } + } + ], + "name": "Agent job 1", + "refName": "Job_1", + "condition": "succeeded()", + "target": { + "executionOptions": { + "type": 0 + }, + "allowScriptsAuthAccessOption": false, + "type": 1 + }, + "jobAuthorizationScope": 1, + "jobTimeoutInMinutes": 360 + } + ], + "type": 1 + }, + "repository": { }, + "processParameters": {}, + "quality": 1, + "authoredBy": { + "displayName": "Brian Moore (AZURE RESOURCE MANAGER)", + "url": "https://app.vssps.visualstudio.com/Ac8aef736-af44-4df8-8ee0-e3f71ba093b7/_apis/Identities/a776ea98-0041-458d-a782-55b352492e1e", + "_links": { + "avatar": { + "href": "https://dev.azure.com/azurequickstarts/_apis/GraphProfile/MemberAvatars/aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk" + } + }, + "id": "a776ea98-0041-458d-a782-55b352492e1e", + "uniqueName": "bmoore@microsoft.com", + "imageUrl": "https://dev.azure.com/azurequickstarts/_apis/GraphProfile/MemberAvatars/aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk", + "descriptor": "aad.ZmNkYzI4MmEtZTY1My03M2Y5LThkNTgtYzgwMTY1ZDM1NTRk" + }, + "drafts": [], + "queue": { }, + "id": 5, + "name": "Azure-QuickStart-Templates-Fork-Import", + "path": "\\", + "type": 2, + "queueStatus": 0, + "revision": 3, + "createdDate": "2019-07-16T16:11:47.817Z", + "project": { + "id": "00000000-0000-0000-0000-000000000000", + "state": 1, + "visibility": 2 + } +} \ No newline at end of file