-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f5b4c5
commit 081f36c
Showing
3 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
resources: | ||
- repo: self | ||
clean: true | ||
queue: | ||
name: Hosted VS2017 | ||
|
||
# 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!; | ||
SQLServerConnectionString: Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=tempdb;Trusted_Connection=True; | ||
system.debug: true | ||
|
||
# CI Trigger on master branch | ||
trigger: | ||
batch: false | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
exclude: | ||
- docs/* | ||
- '**/*.md' | ||
|
||
# Trigger builds for PR's targeting master | ||
pr: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
exclude: | ||
- docs/* | ||
- '**/*.md' | ||
|
||
steps: | ||
- task: DotNetCoreInstaller@0 | ||
displayName: 'Install DotNet Core 2.1.3' | ||
inputs: | ||
version: 2.1.300 | ||
|
||
- task: NuGetToolInstaller@0 | ||
displayName: 'Install NuGet CLI 4.4.1' | ||
inputs: | ||
versionSpec: 4.4.1 | ||
|
||
- task: PowerShell@2 | ||
displayName: 'Build / Test / Create Packages' | ||
inputs: | ||
targetType: filePath | ||
filePath: build.AzureDevops.ps1 | ||
|
||
- task: PublishTestResults@2 | ||
displayName: 'Publish Test Results **/Test-*.xml' | ||
inputs: | ||
testResultsFormat: XUnit | ||
testResultsFiles: '**/Test-*.xml' | ||
mergeTestResults: true | ||
|
||
# PR doesn't create nuget packages. So publish artifact step disabled for PR's | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: packages' | ||
inputs: | ||
PathtoPublish: .nupkgs | ||
ArtifactName: packages | ||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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 |
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