-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packages source for pre-release fhir-net-api versions (#404)
* Packages source for pre-release stu3 versions * Adds descriptions to build configurations
- Loading branch information
1 parent
e208c58
commit b96ee79
Showing
6 changed files
with
108 additions
and
61 deletions.
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
# ASP.NET Core (.NET Framework) | ||
# Build and test ASP.NET Core web applications targeting the full .NET Framework. | ||
# Add steps that publish symbols, save build artifacts, and more: | ||
# https://docs.microsoft.com/vsts/pipelines/languages/dotnet-core | ||
# DESCRIPTION: | ||
# Builds, tests and packages the solution for the CI build configuration. | ||
|
||
name: $(SourceBranchName)-$(Date:yyyyMMdd)$(Rev:-r) | ||
variables: | ||
buildConfiguration: 'Release' | ||
jobs: | ||
- job: Windows | ||
pool: | ||
vmImage: 'vs2017-win2016' | ||
steps: | ||
- template: build.yml | ||
|
||
phases: | ||
- template: build.yml | ||
parameters: | ||
name: Windows | ||
queue: 'Hosted VS2017' | ||
packageArtifacts: true | ||
|
||
- template: build.yml | ||
parameters: | ||
name: Linux | ||
queue: 'Hosted Ubuntu 1604' | ||
packageArtifacts: false | ||
|
||
- job: Linux | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- template: build.yml | ||
parameters: | ||
packageArtifacts: false |
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,33 @@ | ||
# DESCRIPTION: | ||
# This build configuration is used to test the latest alpha/beta packages for the fhir-net-api. | ||
|
||
name: vNext$(SourceBranchName)-$(Date:yyyyMMdd)$(Rev:-r) | ||
variables: | ||
buildConfiguration: 'Release' | ||
jobs: | ||
- job: Windows | ||
pool: | ||
vmImage: 'vs2017-win2016' | ||
steps: | ||
- task: NuGetToolInstaller@0 | ||
displayName: 'Use NuGet 4.7.1' | ||
inputs: | ||
versionSpec: 4.7.1 | ||
checkLatest: true | ||
- task: PowerShell@2 | ||
displayName: 'Get latest Hl7.Fhir version' | ||
inputs: | ||
pwsh: true | ||
targetType: Inline | ||
script: | | ||
$FhirPackage = nuget list $(package.name) -Prerelease -Source https://www.myget.org/F/fhir-net-api/api/v3/index.json | Out-String | ||
Write-Host "##vso[task.setvariable variable=packageVersion]$($FhirPackage.Split()[1])" | ||
- task: PowerShell@2 | ||
displayName: 'Update $(package.name)' | ||
inputs: | ||
pwsh: true | ||
targetType: filePath | ||
filePath: build/Update-Packages.ps1 | ||
arguments: -PackageName $(package.name) -PackageVersion $(packageVersion) | ||
workingDirectory: $(Build.SourcesDirectory) | ||
- template: build.yml |
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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
# ASP.NET Core (.NET Framework) | ||
# Build and test ASP.NET Core web applications targeting the full .NET Framework. | ||
# Add steps that publish symbols, save build artifacts, and more: | ||
# https://docs.microsoft.com/vsts/pipelines/languages/dotnet-core | ||
# DESCRIPTION: | ||
# Builds, tests and packages the solution for all PR requests. | ||
|
||
name: pr$(system.pullRequest.pullRequestNumber)-$(Date:yyyyMMdd)$(Rev:-r) | ||
variables: | ||
buildConfiguration: 'Release' | ||
jobs: | ||
- job: Windows | ||
pool: | ||
vmImage: 'vs2017-win2016' | ||
steps: | ||
- template: build.yml | ||
|
||
phases: | ||
- template: build.yml | ||
parameters: | ||
name: Windows | ||
queue: 'Hosted VS2017' | ||
packageArtifacts: true | ||
|
||
- template: build.yml | ||
parameters: | ||
name: Linux | ||
queue: 'Hosted Ubuntu 1604' | ||
packageArtifacts: false | ||
- job: Linux | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- template: build.yml | ||
parameters: | ||
packageArtifacts: false |
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 @@ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string]$PackageVersion, | ||
|
||
[Parameter(Mandatory = $true)] | ||
[ValidateNotNullOrEmpty()] | ||
[string]$PackageName | ||
) | ||
|
||
Set-StrictMode -Version Latest | ||
|
||
$projects = Get-Childitem -Path *.csproj -File -Recurse | ||
Write-Host "Updating $($projects)" | ||
|
||
foreach($file in $projects) { | ||
[xml] $csproj = Get-Content $file | ||
$packageReference = $csproj.Project.SelectNodes("ItemGroup/PackageReference") | Where-Object Include -eq $PackageName | ||
|
||
if ($null -ne $packageReference) { | ||
Write-Host "Updating $($file)" | ||
$packageReference.setAttribute('Version', $packageVersion) | Out-Null | ||
$csproj.Save($file) | Out-Null | ||
} | ||
} |
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 |
---|---|---|
@@ -1,35 +1,21 @@ | ||
parameters: | ||
# Default values | ||
name: Windows | ||
queue: 'Hosted VS2017' | ||
packageArtifacts: true | ||
|
||
phases: | ||
- phase: ${{ parameters.name }} | ||
queue: '${{ parameters.queue }}' | ||
steps: | ||
- task: DotNetCoreInstaller@0 | ||
inputs: | ||
version: '2.2.103' | ||
|
||
variables: | ||
solution: '**/*.sln' | ||
buildPlatform: 'Any CPU' | ||
buildConfiguration: 'Release' | ||
- script: dotnet build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) /warnaserror | ||
displayName: 'dotnet build $(buildConfiguration)' | ||
|
||
steps: | ||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet test UnitTests' | ||
inputs: | ||
command: test | ||
projects: '**/*UnitTests/*.csproj' | ||
arguments: '--configuration $(buildConfiguration)' | ||
|
||
- task: NuGetToolInstaller@0 | ||
|
||
- task: DotNetCoreInstaller@0 | ||
inputs: | ||
version: '2.2.103' | ||
|
||
- script: dotnet build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) /warnaserror | ||
displayName: 'dotnet build $(buildConfiguration)' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet test UnitTests' | ||
inputs: | ||
command: test | ||
projects: '**/*UnitTests/*.csproj' | ||
arguments: '--configuration $(buildConfiguration)' | ||
|
||
- ${{ if eq(parameters.packageArtifacts, 'true') }}: | ||
- template: package.yml | ||
- ${{ if eq(parameters.packageArtifacts, 'true') }}: | ||
- template: package.yml |
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