This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| securityContext: | |
| privileged: true | |
| allowPrivilegeEscalation: true | |
| restartPolicy: Always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger: | |
| paths: | |
| include: | |
| - '/helm/first-app' | |
| jobs: | |
| - job: | |
| displayName: Install first-app via helm 3 | |
| pool: | |
| vmImage: 'ubuntu-latest' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import Counter | |
| def get_count_of_unique_words(lines): | |
| selected_words = [] | |
| for word in lines: | |
| if word.isalpha(): | |
| selected_words.append(word) | |
| unique_count = 0 | |
| for letter, count in Counter(selected_words).items(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unique_word_count = len(input_lines) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| WORD_PATTERN = "[a-z-A-Z]*" | |
| selected_words = [] | |
| for word in input_lines | |
| if len(word) > 1 and re.match(WORD_PATTERN, word).endpos > 0: | |
| selected_words.append(word) | |
| unique_count = len(selected_words.items()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import Counter | |
| unique_count = len(Counter(selected_words).items()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": {}, | |
| "functions": [], | |
| "variables": {}, | |
| "resources": [], | |
| "outputs": {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": {} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - task: AzurePowerShell@5 | |
| displayName: Validate ARM templates | |
| inputs: | |
| azureSubscription: "$(dev-environment-subscription)" # ideally it should be validate in same subscription as dev, nonproduction or production | |
| ScriptType: "FilePath" | |
| ScriptPath: "$(System.DefaultWorkingDirectory)/validate_templates.ps1" # script basically run Test-AzResourceGroupDeployment for all templates and their parameters | |
| ScriptArguments: '-resourceGroupName $(validation-sandbox) -location $(location) -templateDirectoryPath $(System.DefaultWorkingDirectory)\arm_templates' | |
| azurePowerShellVersion: "LatestVersion" | |
| FailOnStandardError: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Test-AzResourceGroupDeployment ` | |
| -ResourceGroupName $resourceGroupName ` | |
| -TemplateFile $templateFilePath ` | |
| -TemplateParameterFile $parameterFilePath | |