Packages source for pre-release fhir-net-api versions (#404)
* Packages source for pre-release stu3 versions * Adds descriptions to build configurations
This commit is contained in:
Родитель
e208c580c6
Коммит
b96ee79577
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<!-- When <clear /> is present, previously defined sources are ignored -->
|
||||
<clear />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="Hl7.Fhir" value="https://www.myget.org/F/fhir-net-api/api/v3/index.json" />
|
||||
</packageSources>
|
||||
<activePackageSource>
|
||||
<add key="All" value="(Aggregate source)" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче