This file contains 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
[CmdletBinding()] param () | |
$AppNames = @( | |
"OrdersApi", | |
"PeopleApi" | |
) | |
$Envs = @( | |
"dev", | |
"qa" | |
) |
This file contains 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
@description('App Service location. Default is the location of the resource group.') | |
param location string = resourceGroup().location | |
@description('App base name') | |
param appBaseName string = 'myapp' | |
@description('Environment Name.') | |
param envName string = 'dev' | |
var applicationGateWayName = 'apgw-${appBaseName}-${envName}-${location}-001' |
This file contains 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
$CertName = 'mycert' | |
$SrcVault = 'kv-cert-issuer-001' | |
$DstVault = 'kv-cert-consumer-001' | |
$secret = Get-AzKeyVaultSecret -VaultName $SrcVault -Name $CertName | |
$secretValueText = ''; | |
$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret.SecretValue) | |
try { | |
$secretValueText = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) | |
} | |
finally { |
This file contains 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
<script setup lang="ts"> | |
import { ref, watch, onMounted } from "vue"; | |
const props = defineProps<{ | |
modelValue: number; | |
}>(); | |
const emit = defineEmits<{ | |
(e: "update:modelValue", value: number): void; | |
}>(); |
This file contains 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: joachimdalen.pull-request-utils.5c6ec8a1-d04c-44c0-99b8-42dd865b42e8.PullRequestComments@0 | |
displayName: 'Pull Request Comments' | |
inputs: | |
action: createOrUpdate | |
content: | | |
Environment created at https://$(siteName).lpains.com | |
To access it, you need to update your hosts file. Using a powershell terminal as admin, run the following: | |
```powershell |
This file contains 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
variables: | |
prId: "$(System.PullRequest.PullRequestId)" | |
prName: "PR$(prId)" | |
siteName: '$(prName)' | |
dbServer: 'LPainsDB' | |
dbName: '$(siteName)' | |
ConnectionString: 'server=$(dbServer);database=$(dbName);integrated security=sspi;' |
This file contains 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
{ | |
"Logging": { | |
"LogLevel": { | |
"Default": "Warning" | |
} | |
}, | |
"AllowedHosts": "*", | |
"ConnectionStrings": { | |
"Default": "Data Source=MyDB;Initial Catalog=DbName;Integrated Security=True;" | |
} |
This file contains 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
# remember to run this script as an Admin | |
Import-Module SQLServer | |
# get open PRs from your repository | |
$B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("your pat token goes here")) | |
$header = @{Authorization = "Basic $B64Pat"} | |
$url = "https://dev.azure.com/your-org/your-project/_apis/git/pullrequests?repositoryId=d26dc76c-6593-4612-acde-4ac37af9cf2f&includeCommits=false&includeWorkItemRefs=false" | |
$prArray = (Invoke-RestMethod -Uri $url -Method Get -ContentType "application/json" -Headers $header).value | |
# find the existing environments in the VM |
This file contains 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
$guid = [guid]::NewGuid().ToString("B") | |
netsh http add sslcert hostnameport="$siteName.lpains.com:443" certhash=thumbprint certstorename=MY appid="$guid" |
This file contains 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
appcmd add apppool /in < c:\apppools.xml | |
appcmd add site /in < c:\sites.xml |
NewerOlder