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
# Login to Azure | |
Connect-AzAccount | |
$keyvaultName = "name of your Key Vault" | |
$region = "europewest" | |
$path = "C:\LocalFolder\PublicIPs_20190107.xml" | |
# Do not change me | |
$xPath = "/AzurePublicIpAddresses/Region" | |
$regionIP = Select-Xml -Path $Path -XPath $Xpath | Select-Object -ExpandProperty Node | Where-Object Name -eq $region |
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
# Login to Azure | |
Connect-AzAccount | |
Set-Location $PSScriptRoot; | |
$resourceGroupName = "ResourceGroup" | |
$serverName = "sqlserverinstance01" | |
$path = "C:\LocalFolder\PublicIPs_20190107.xml" | |
$xPath = "/AzurePublicIpAddresses/Region" |
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
$environmentCode = "TST" | |
$testCategoryCode = "INT" | |
$testTypeCode = "COMPEXIST" | |
$connString = "Server connection details" | |
# Setup Environment (metadata database) | |
$obtainTests = "EXEC Test.ObtainTests '$environmentCode', '$testCategoryCode', '$testTypeCode'" | |
$tests = Invoke-Sqlcmd -ConnectionString ($connString) -Query $obtainTests | |
# Validate Deployment of components using Pester |
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
$environmentCode = "TST" | |
$testCategoryCode = "INT" | |
$testTypeCode = "INTR2C" | |
$connString = "Server connection details" | |
$dwConnString = "Server connection details" | |
Set-Location $PSScriptRoot | |
$obtainTests = "EXEC Test.ObtainTests '$environmentCode', '$testCategoryCode', '$testTypeCode'" | |
$tests = Invoke-Sqlcmd -ConnectionString $connString -Query $obtainTests |
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
Set-Location $PSScriptRoot; | |
Install-PackageProvider -Name NuGet -Force -Scope CurrentUser | |
Install-Module -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck -AllowClobber | |
Install-Module -Name SqlServer -Force -Scope CurrentUser -AllowClobber | |
Import-Module -Name Pester -Force | |
Invoke-Pester -OutputFile "integrationTestResults1.xml" -OutputFormat NUnitXml -Script @{Path = './ComponentExists.Integration.tests.ps1'} | |
# Stop all other tests if and ComponentExists test fail |
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
$connString = "Server connection details" | |
$environmentCode = "TST" | |
$testCategoryCode = "REG" | |
if($null -eq (Get-AzureRmContext).Account){ | |
Connect-AzureRmAccount | |
} | |
Set-Location $PSScriptRoot |
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
USE AdventureWorks2012; | |
WITH | |
LocalExchange AS ( | |
SELECT | |
ToCurrencyCode AS CurrencyCode, | |
CASE WHEN ToCurrencyCode <> 'EUR' THEN (1 / AverageRate) END AS LocalCurrencyConversion, | |
CurrencyRateDate | |
FROM [Sales].[CurrencyRate] ), | |
EuroExchange AS ( |
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
# COMMAND ---------- | |
import boto3 | |
from botocore.config import Config | |
# COMMAND ---------- | |
awsAccessKeyId = dbutils.secrets.get("scopeName", key = "AWSAccessKeyID") | |
awsSecretAccessKey = dbutils.secrets.get("scopeName", key = "AWSSecretAccessKey") |
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
def checkTheList(list): | |
checklist = [{"name": "Lovehaze", "isNice": False}, {"name": "Cloudtrip", "isNice": True}, {"name": "Moonsounds", "isNice": False}, {"name": "Startrance", "isNice": True}, {"name": "Freedream", "isNice": False}] | |
if list == checklist: | |
return True | |
else: | |
return False | |
def cryingChild(list): | |
for child in children: |
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
parameters: | |
group: variable-group | |
azureResourceManagerConnection: 'Service_Connection_Name' | |
deploymentName: stage_deployment | |
displayName: SynapseDeployment | |
environment: Development | |
jobs: | |
- deployment: ${{ parameters.deploymentName }} |
OlderNewer