8000 Build: Service containers by NickCraver · Pull Request #360 · MiniProfiler/dotnet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Build: Service containers #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub&rdquo 8000 ;, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 36 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,44 @@
resources:
- repo: self
clean: true
queue:
containers:
- container: redis
image: redis
ports:
- 6379:6379
- container: mongo
image: mongo
ports:
- 27017:27017
- container: mysql
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
- container: postgres
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test

services:
redis: redis
mongo: mongo
mysql: mysql
postgres: postgres

pool:
name: Hosted VS2017
vmImage: vs2017-win2016

# Build Variables
variables:
MySQLConnectionString: server=localhost;uid=root;pwd='';database=test;Allow User Variables=true
PGPASSWORD: Password12! #Needed for PostgreSQL Installation
PGUSER: postgres #Needed for PostgreSQL Installation
PostgreSqlConnectionString: Server=localhost;Port=5432;Database=test;User Id=postgres;Password=Password12!;
RedisConnectionString: localhost:6379
MongoDbConnectionString: mongodb://localhost:27017/test
MySQLConnectionString: server=localhost;uid=root;pwd=root;database=test;Allow User Variables=true
PostgreSqlConnectionString: Server=localhost;Port=5432;Database=test;User Id=postgres;Password=postgres;
SQLServerConnectionString: Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=tempdb;Trusted_Connection=True;
system.debug: true

Expand All @@ -35,18 +64,6 @@ pr:
- '**/*.md'

steps:
- task: DotNetCoreInstaller@0
displayName: 'Install DotNet Core 2.1.3'
inputs:
version: 2.1.300
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

- task: NuGetToolInstaller@0
displayName: 'Install NuGet CLI 4.4.1'
inputs:
versionSpec: 4.4.1

- task: PowerShell@2
displayName: 'Build / Test / Create Packages'
inputs:
Expand Down
24 changes: 0 additions & 24 deletions build.azureDevops.ps1
Original file line number Diff line number Diff line change
@@ -1,26 +1,2 @@
# Setup Redis with Nuget
nuget install redis-64 -excludeversion
redis-64\tools\redis-server.exe --service-install; redis-64\tools\redis-server.exe --service-start

# Setup PostgreSQL, MySQL, MongoDB using Chocolatey
choco feature enable -n=allowGlobalConfirmation
choco install mongodb --version 3.6.0
choco install mysql --version 5.7.18
choco install postgresql --version 9.6.8 --params "/Password:$PGPASSWORD"

# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
refreshenv

mysql -e "create database test;" --user=root
createdb test

mkdir D:\data\db
# Start MongoDB as run as Background Process
Start-Process "C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" -ArgumentList "--dbpath D:\data\db" -NoNewWindow -RedirectStandardOutput log.txt

# Build Variables at https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=vsts#build-variables
.\build.ps1 -CreatePackages $true -PullRequestNumber $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER
0