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
$outerLoopMax = 255 | |
$innerLoopMax = 126 | |
for ($outerCounter=1; $outerCounter -lt $outerLoopMax; $outerCounter++) { | |
Write-Progress -Activity "Main loop progress:" ` | |
-PercentComplete ([int](100 * $outerCounter / $outerLoopMax)) ` | |
-CurrentOperation ("Completed {0}%" -f ([int](100 * $outerCounter / $outerLoopMax))) ` | |
-Status ("Outer loop working on item [{0}]" -f $outerCounter) ` | |
-Id 1 | |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: dotnetcore | |
labels: | |
app: dotnetcore | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 80 |
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
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: vsts-agent | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: vsts-agent |
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
docker run \ | |
-e VSTS_ACCOUNT=<youraccountname> \ | |
-e VSTS_TOKEN=<your-account-Private-access-token> \ | |
-e VSTS_AGENT='$(hostname)-agent' \ | |
-e VSTS_POOL=dockerized-vsts-agents \ | |
-e VSTS_WORK='/var/vsts/$VSTS_AGENT' \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /var/vsts:/var/vsts \ | |
-d microsoft/vsts-agent:<docker-image-name> |
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
# Build Docker image for this app using Azure Pipelines | |
pool: | |
name: 'dockerized-vsts-agents' | |
variables: | |
buildConfiguration: 'Release' | |
imageName: 'dotnetcore:$(Build.BuildId)' | |
steps: |
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
Get-ChildItem -Recurse -Filter "*.coverage" | % { | |
$outfile = "$([System.IO.Path]::GetFileNameWithoutExtension($_.FullName)).coveragexml" | |
$output = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($_.FullName), $outfile) | |
"Analyse '$($_.Name)' with output '$outfile'..." | |
. $env:USERPROFILE\.nuget\packages\microsoft.codecoverage\15.8.0\build\netstandard1.0\CodeCoverage\CodeCoverage.exe analyze /output:$output $_.FullName | |
} | |
"Done" |
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
{ | |
"certificateSettings": { | |
"fileName": "my_web_domain.pfx", | |
"password": "YourSecurePassword" | |
} | |
} |
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 microsoft/dotnet:2.1-aspnetcore-runtime | |
WORKDIR /app | |
COPY --from=build /app . | |
COPY my_web_domain.pfx . | |
... |
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
# Generates Certificate and import it to Current user's certificate Store | |
$certificate = New-SelfSignedCertificate ` | |
-Subject my_web_domain` | |
-DnsName my_web_domain ` | |
-KeyAlgorithm RSA ` | |
-KeyLength 2048 ` | |
-NotBefore (Get-Date) ` | |
-NotAfter (Get-Date).AddYears(1) ` | |
-CertStoreLocation "cert:CurrentUser\My" ` | |
-FriendlyName "Localhost Certificate for .NET Core" ` |
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
... | |
ports: | |
- 5000:80 | |
- 5001:443 | |
environment: | |
ASPNETCORE_URLS: "https://+;http://+" | |
ASPNETCORE_Kestrel__Certificates__Default__Password: "YourSecurePassword" | |
ASPNETCORE_Kestrel__Certificates__Default__Path: "my_web_domain.pfx" | |
... |