Merge branch 'master' of https://github.com/hapifhir/org.hl7.fhir.core into gg-work
This commit is contained in:
commit
c6e424d50d
85
README.md
85
README.md
|
@ -1,18 +1,23 @@
|
||||||
# HAPI FHIR - HL7 FHIR Core Artifacts
|
# HAPI FHIR - HL7 FHIR Core Artifacts
|
||||||
|
|
||||||
### CI/CD
|
| CI Status (master) |
|
||||||
| master Branch CI | SNAPSHOT Publisher |
|
| :---: |
|
||||||
| :---: | :---: |
|
| [![Build Status][Badge-BuildPipeline]][Link-BuildPipeline] |
|
||||||
| [![Build Status][Badge-BuildPipeline]][Link-BuildPipeline] | [![Build Status][Badge-SnapshotPipeline]][Link-SnapshotPipeline] |
|
|
||||||
|
|
||||||
All intergration and delivery done on Azure pipelines. Every successful merge to master branch will result in a new SNAPSHOT build being published to Sonatype. Azure project can be viewed [here][Link-AzureProject].
|
### CI/CD
|
||||||
|
|
||||||
|
All intergration and delivery done on Azure pipelines. Azure project can be viewed [here][Link-AzureProject].
|
||||||
|
|
||||||
### Current Versions
|
### Current Versions
|
||||||
| Project | Latest SNAPSHOT | Current Release |
|
| Project | Current Release | Latest SNAPSHOT |
|
||||||
| :---: | :---: | :---: |
|
| :---: | :---: | :---: |
|
||||||
| org.hl7.fhir.validation.cli | [![Snapshot Artifact][Badge-cliSonatypeSnapshot]][Link-cliSonatypeSnapshot] | [![Release Artifacts][Badge-cliSonatypeRelease]][Link-cliSonatypeRelease] |
|
| org.hl7.fhir.validation.cli | [![Release Artifacts][Badge-r4SonatypeRelease]][Link-cliSonatypeRelease] | [![Snapshot Artifact][Badge-cliSonatypeSnapshot]][Link-cliSonatypeSnapshot] |
|
||||||
| org.hl7.fhir.r4 | [![Snapshot Artifact][Badge-r4SonatypeSnapshot]][Link-r4SonatypeSnapshot] | [![Release Artifacts][Badge-r4SonatypeRelease]][Link-r4SonatypeRelease] |
|
| org.hl7.fhir.validation | [![Release Artifacts][Badge-validationSonatypeRelease]][Link-validationSonatypeRelease] | [![Snapshot Artifact][Badge-validationSonatypeSnapshot]][Link-validationSonatypeSnapshot] |
|
||||||
| org.hl7.fhir.r5 | [![Snapshot Artifact][Badge-r5SonatypeSnapshot]][Link-r5SonatypeSnapshot] | [![Release Artifacts][Badge-r5SonatypeRelease]][Link-r5SonatypeRelease] |
|
| org.hl7.fhir.dstu2 | [![Release Artifacts][Badge-dstu2SonatypeRelease]][Link-dstu2SonatypeRelease] | [![Snapshot Artifact][Badge-dstu2SonatypeSnapshot]][Link-dstu2SonatypeSnapshot] |
|
||||||
|
| org.hl7.fhir.dstu2016may | [![Release Artifacts][Badge-dstu2016maySonatypeRelease]][Link-dstu2016maySonatypeRelease] | [![Snapshot Artifact][Badge-dstu2016maySonatypeSnapshot]][Link-dstu2016maySonatypeSnapshot] |
|
||||||
|
| org.hl7.fhir.dstu3 | [![Release Artifacts][Badge-dstu3SonatypeRelease]][Link-dstu3SonatypeRelease] | [![Snapshot Artifact][Badge-dstu3SonatypeSnapshot]][Link-dstu3SonatypeSnapshot] |
|
||||||
|
| org.hl7.fhir.r4 | [![Release Artifacts][Badge-r4SonatypeRelease]][Link-r4SonatypeRelease] | [![Snapshot Artifact][Badge-r4SonatypeSnapshot]][Link-r4SonatypeSnapshot] |
|
||||||
|
| org.hl7.fhir.r5 | [![Release Artifacts][Badge-r5SonatypeRelease]][Link-r5SonatypeRelease] | [![Snapshot Artifact][Badge-r5SonatypeSnapshot]][Link-r5SonatypeSnapshot] |
|
||||||
|
|
||||||
### Building this Project
|
### Building this Project
|
||||||
This project uses [Apache Maven](http://maven.apache.org) to build. To build:
|
This project uses [Apache Maven](http://maven.apache.org) to build. To build:
|
||||||
|
@ -25,6 +30,11 @@ To skip unit tests:
|
||||||
```
|
```
|
||||||
mvn -Dmaven.test.skip install
|
mvn -Dmaven.test.skip install
|
||||||
```
|
```
|
||||||
|
### Publishing Binaries
|
||||||
|
|
||||||
|
An brief overview of our publishing process is [here][Link-Publishing].
|
||||||
|
|
||||||
|
For more detailed instructions on cutting a release, please read [the wiki][Link-PublishingRelease]
|
||||||
|
|
||||||
### Download
|
### Download
|
||||||
##### org.hl7.fhir.validation.cli
|
##### org.hl7.fhir.validation.cli
|
||||||
|
@ -42,6 +52,36 @@ mvn -Dmaven.test.skip install
|
||||||
compile group: 'ca.uhn.hapi.fhir', name: 'org.hl7.fhir.validation.cli', version: '(latest version)'
|
compile group: 'ca.uhn.hapi.fhir', name: 'org.hl7.fhir.validation.cli', version: '(latest version)'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### org.hl7.fhir.dstu2
|
||||||
|
###### Maven
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
|
<artifactId>hapi-fhir-structures-dstu2</artifactId>
|
||||||
|
<version>(latest version)</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
###### Gradle
|
||||||
|
```groovy
|
||||||
|
compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-dstu2', version: '(latest version)'
|
||||||
|
```
|
||||||
|
|
||||||
|
##### org.hl7.fhir.dstu3
|
||||||
|
###### Maven
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
|
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||||
|
<version>(latest version)</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
###### Gradle
|
||||||
|
```groovy
|
||||||
|
compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-dstu3', version: '(latest version)'
|
||||||
|
```
|
||||||
|
|
||||||
##### org.hl7.fhir.r4
|
##### org.hl7.fhir.r4
|
||||||
###### Maven
|
###### Maven
|
||||||
```xml
|
```xml
|
||||||
|
@ -76,24 +116,41 @@ compile group: 'ca.uhn.hapi.fhir', name: 'hapi-fhir-structures-r5', version: '(l
|
||||||
This project is maintained by [Grahame Grieve][Link-grahameGithub] and [James Agnew][Link-jamesGithub] on behalf of the FHIR community.
|
This project is maintained by [Grahame Grieve][Link-grahameGithub] and [James Agnew][Link-jamesGithub] on behalf of the FHIR community.
|
||||||
|
|
||||||
[Link-AzureProject]: https://dev.azure.com/fhir-pipelines/fhir-core-library
|
[Link-AzureProject]: https://dev.azure.com/fhir-pipelines/fhir-core-library
|
||||||
[Link-BuildPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_build/latest?definitionId=16&branchName=master
|
[Link-BuildPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_build/latest?definitionId=29&branchName=master
|
||||||
[Link-SnapshotPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_build/latest?definitionId=17&branchName=master
|
[Link-SnapshotPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_build/latest?definitionId=17&branchName=master
|
||||||
|
[Link-dstu2SonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.dstu2&v=LATEST "Sonatype Snapshot"
|
||||||
|
[Link-dstu2SonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.dstu2&v=LATEST "Sonatype Release"
|
||||||
|
[Link-dstu2016maySonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.dstu2016may&v=LATEST "Sonatype Snapshot"
|
||||||
|
[Link-dstu2016maySonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.dstu2016may&v=LATEST "Sonatype Release"
|
||||||
|
[Link-dstu3SonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.dstu3&v=LATEST "Sonatype Snapshot"
|
||||||
|
[Link-dstu3SonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.dstu3&v=LATEST "Sonatype Release"
|
||||||
[Link-r4SonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r4&v=LATEST "Sonatype Snapshot"
|
[Link-r4SonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r4&v=LATEST "Sonatype Snapshot"
|
||||||
[Link-r4SonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r4&v=LATEST "Sonatype Release"
|
[Link-r4SonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r4&v=LATEST "Sonatype Release"
|
||||||
[Link-r5SonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r5&v=LATEST "Sonatype Snapshot"
|
[Link-r5SonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r5&v=LATEST "Sonatype Snapshot"
|
||||||
[Link-r5SonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r5&v=LATEST "Sonatype Release"
|
[Link-r5SonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.r5&v=LATEST "Sonatype Release"
|
||||||
[Link-cliSonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation.cli&v=LATEST "Sonatype Snapshot"
|
[Link-cliSonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation.cli&v=LATEST "Sonatype Snapshot"
|
||||||
[Link-cliSonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation.cli&v=LATEST "Sonatype Release"
|
[Link-cliSonatypeRelease]: https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar
|
||||||
|
[Link-validationSonatypeSnapshot]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation&v=LATEST "Sonatype Snapshot"
|
||||||
|
[Link-validationSonatypeRelease]: https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=ca.uhn.hapi.fhir&a=org.hl7.fhir.validation&v=LATEST "Sonatype Release"
|
||||||
[Link-grahameGithub]: https://github.com/grahamegrieve
|
[Link-grahameGithub]: https://github.com/grahamegrieve
|
||||||
[Link-jamesGithub]: https://github.com/jamesagnew
|
[Link-jamesGithub]: https://github.com/jamesagnew
|
||||||
|
[Link-Publishing]: https://github.com/FHIR/fhir-test-cases/wiki/Publishing-Binaries
|
||||||
|
[Link-PublishingRelease]: https://github.com/FHIR/fhir-test-cases/wiki/Detailed-Release-Instructions
|
||||||
|
|
||||||
[Badge-BuildPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_apis/build/status/Build%20%26%20Test?branchName=master
|
|
||||||
|
[Badge-BuildPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_apis/build/status/Master%20Branch%20Pipeline?branchName=master
|
||||||
[Badge-SnapshotPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_apis/build/status/Module%20SNAPSHOT%20Publisher?branchName=master
|
[Badge-SnapshotPipeline]: https://dev.azure.com/fhir-pipelines/fhir-core-library/_apis/build/status/Module%20SNAPSHOT%20Publisher?branchName=master
|
||||||
|
[Badge-dstu2SonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2.svg "Sonatype Releases"
|
||||||
|
[Badge-dstu2SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2.svg "Sonatype Snapshots"
|
||||||
|
[Badge-dstu2016maySonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2016may.svg "Sonatype Releases"
|
||||||
|
[Badge-dstu2016maySonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2016may.svg "Sonatype Snapshots"
|
||||||
|
[Badge-dstu3SonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.dstu3.svg "Sonatype Releases"
|
||||||
|
[Badge-dstu3SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.dstu3.svg "Sonatype Snapshots"
|
||||||
[Badge-r4SonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r4.svg "Sonatype Releases"
|
[Badge-r4SonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r4.svg "Sonatype Releases"
|
||||||
[Badge-r4SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r4.svg "Sonatype Snapshots"
|
[Badge-r4SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r4.svg "Sonatype Snapshots"
|
||||||
[Badge-r5SonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r5.svg "Sonatype Releases"
|
[Badge-r5SonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r5.svg "Sonatype Releases"
|
||||||
[Badge-r5SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r5.svg "Sonatype Snapshots"
|
[Badge-r5SonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.r5.svg "Sonatype Snapshots"
|
||||||
[Badge-cliSonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Releases"
|
[Badge-cliSonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Releases"
|
||||||
[Badge-cliSonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Snapshots"
|
[Badge-cliSonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli.svg "Sonatype Snapshots"
|
||||||
|
[Badge-validationSonatypeRelease]: https://img.shields.io/nexus/r/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.svg "Sonatype Releases"
|
||||||
|
[Badge-validationSonatypeSnapshot]: https://img.shields.io/nexus/s/https/oss.sonatype.org/ca.uhn.hapi.fhir/org.hl7.fhir.validation.svg "Sonatype Snapshots"
|
||||||
|
|
|
@ -1,105 +0,0 @@
|
||||||
trigger: none
|
|
||||||
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
# Different users have different machine setups, we run the build three times, on ubuntu, osx, and windows
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
linux:
|
|
||||||
imageName: 'ubuntu-latest'
|
|
||||||
mac:
|
|
||||||
imageName: "macos-10.15"
|
|
||||||
windows:
|
|
||||||
imageName: "windows-2019"
|
|
||||||
maxParallel: 3
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: $(imageName)
|
|
||||||
|
|
||||||
variables:
|
|
||||||
currentImage: $(imageName)
|
|
||||||
codecov: $(CODECOV_TOKEN)
|
|
||||||
VERSION:
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# This task pulls the <version> value from the org.hl7.fhir.r5 project pom.xml file. All modules are released as
|
|
||||||
# the same version, at the same time, as defined in the root level pom.xml.
|
|
||||||
- task: PowerShell@2
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
|
||||||
inputs:
|
|
||||||
targetType: 'inline'
|
|
||||||
script: |
|
|
||||||
[xml]$pomXml = Get-Content -Path .\pom.xml
|
|
||||||
# version
|
|
||||||
Write-Host $pomXml.project.version
|
|
||||||
$version=$pomXml.project.version
|
|
||||||
Write-Host "##vso[task.setvariable variable=version]$version"
|
|
||||||
|
|
||||||
# Prints out the build version, for debugging purposes
|
|
||||||
- bash: echo Pulled version from pom.xml => $(version)
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
|
||||||
|
|
||||||
# Azure pipelines cannot pass variables between pipelines, but it can pass files, so we
|
|
||||||
# pass the build id (ex: 1.1.13-SNAPSHOT) as a string in a file.
|
|
||||||
# This is used in the release pipeline, so we create it here.
|
|
||||||
# This is only done for the release branch.
|
|
||||||
- bash: |
|
|
||||||
echo $(version)
|
|
||||||
VERSION=$(version)
|
|
||||||
echo "$VERSION" > $(System.DefaultWorkingDirectory)/VERSION
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
|
||||||
|
|
||||||
# Copies the VERSION file containing the build id (ex: 1.1.13-SNAPSHOT) to the staging directory
|
|
||||||
# This is done for release versions only.
|
|
||||||
- task: CopyFiles@2
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
|
||||||
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
|
|
||||||
inputs:
|
|
||||||
SourceFolder: '$(System.Defaultworkingdirectory)'
|
|
||||||
Contents: "$(System.DefaultWorkingDirectory)/VERSION"
|
|
||||||
TargetFolder: '$(build.artifactstagingdirectory)'
|
|
||||||
|
|
||||||
# Runs 'mvn clean package'
|
|
||||||
- task: Maven@3
|
|
||||||
inputs:
|
|
||||||
mavenPomFile: 'pom.xml'
|
|
||||||
mavenOptions: '-Xmx3072m'
|
|
||||||
javaHomeOption: 'JDKVersion'
|
|
||||||
jdkVersionOption: '1.8'
|
|
||||||
jdkArchitectureOption: 'x64'
|
|
||||||
publishJUnitResults: true
|
|
||||||
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
|
||||||
goals: 'package'
|
|
||||||
|
|
||||||
# Upload test results to codecov
|
|
||||||
- script: bash <(curl https://codecov.io/bash) -t $(codecov)
|
|
||||||
displayName: 'codecov Bash Uploader'
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
|
||||||
|
|
||||||
# Publishes the test results to build artifacts.
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
displayName: 'Publish JaCoCo test results '
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: 'JaCoCo'
|
|
||||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/jacoco.xml'
|
|
||||||
reportDirectory: '$(System.DefaultWorkingDirectory)/org.hl7.fhir.report/target/site/jacoco-aggregate/'
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
|
||||||
|
|
||||||
# Publishes the built Validator jar to build artifacts. Primarily for testing and debugging builds.
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
displayName: 'Publish Validator jar'
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
|
||||||
inputs:
|
|
||||||
targetPath: "$(System.DefaultWorkingDirectory)/org.hl7.fhir.validation/target/org.hl7.fhir.validation-$(version).jar"
|
|
||||||
artifactName: Validator
|
|
||||||
|
|
||||||
# Publishes the files we've moved into the staging directory, so they can be accessed by the
|
|
||||||
# release pipeline. You will notice that we only do this for the ubuntu build, as doing it
|
|
||||||
# for each of the three release pipelines will cause conflicts.
|
|
||||||
# This is done for release versions only.
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
|
||||||
displayName: 'Publish Build Artifacts'
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: '$(build.artifactstagingdirectory)'
|
|
||||||
|
|
|
@ -81,5 +81,5 @@ steps:
|
||||||
inputs:
|
inputs:
|
||||||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
||||||
goals: deploy
|
goals: deploy
|
||||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml'
|
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml -Pdeploy'
|
||||||
publishJUnitResults: false
|
publishJUnitResults: false
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
# This pipeline produces a SNAPSHOT build for each of the sub modules in
|
|
||||||
# the core library, and publishes them to ossrh.
|
|
||||||
trigger: none
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: "ubuntu-16.04"
|
|
||||||
|
|
||||||
variables:
|
|
||||||
currentModule: $(module)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# Signing, for now, occurs for all builds, SNAPSHOT or release. So we need a valid
|
|
||||||
# signing key. The next two steps download the public and private keys from the
|
|
||||||
# secure library files.
|
|
||||||
- task: DownloadSecureFile@1
|
|
||||||
displayName: 'Download public key.'
|
|
||||||
inputs:
|
|
||||||
secureFile: public.key
|
|
||||||
|
|
||||||
- task: DownloadSecureFile@1
|
|
||||||
displayName: 'Download private key.'
|
|
||||||
inputs:
|
|
||||||
secureFile: private.key
|
|
||||||
|
|
||||||
# Import both the private and public keys into gpg for signing.
|
|
||||||
- bash: |
|
|
||||||
gpg --import --no-tty --batch --yes $(Agent.TempDirectory)/public.key
|
|
||||||
gpg --import --no-tty --batch --yes $(Agent.TempDirectory)/private.key
|
|
||||||
gpg --list-keys --keyid-format LONG
|
|
||||||
gpg --list-secret-keys --keyid-format LONG
|
|
||||||
displayName: 'Import signing keys.'
|
|
||||||
|
|
||||||
# For creating the snapshot release with maven, we need to build a fake settings.xml
|
|
||||||
# for it to read from. This is done for the master branch merges only.
|
|
||||||
- bash: |
|
|
||||||
cat >$(System.DefaultWorkingDirectory)/settings.xml <<EOL
|
|
||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
|
||||||
https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<username>$(SONATYPE_USER)</username>
|
|
||||||
<password>$(SONATYPE_PASS)</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>sonatype-nexus-snapshots</id>
|
|
||||||
<username>$(SONATYPE_USER)</username>
|
|
||||||
<password>$(SONATYPE_PASS)</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>sonatype-nexus-staging</id>
|
|
||||||
<username>$(SONATYPE_USER)</username>
|
|
||||||
<password>$(SONATYPE_PASS)</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>$(PGP_KEYNAME)</id>
|
|
||||||
<passphrase>$(PGP_PASSPHRASE)</passphrase>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>release</id>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
<properties>
|
|
||||||
<gpg.keyname>$(PGP_KEYNAME)</gpg.keyname>
|
|
||||||
</properties>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</settings>
|
|
||||||
EOL
|
|
||||||
displayName: 'Create .mvn/settings.xml'
|
|
||||||
|
|
||||||
# Deploy the SNAPSHOT artifact to sonatype nexus.
|
|
||||||
# This is done for the master branch merges only.
|
|
||||||
- task: Maven@3
|
|
||||||
displayName: 'Deploy $(module) to Sonatype staging'
|
|
||||||
inputs:
|
|
||||||
mavenPomFile: '$(System.DefaultWorkingDirectory)/pom.xml'
|
|
||||||
goals: deploy
|
|
||||||
options: '--settings $(System.DefaultWorkingDirectory)/settings.xml'
|
|
||||||
publishJUnitResults: false
|
|
File diff suppressed because it is too large
Load Diff
46
pom.xml
46
pom.xml
|
@ -311,24 +311,6 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>1.6</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<keyname>${gpg.keyname}</keyname>
|
|
||||||
<passphraseServerId>${gpg.keyname}</passphraseServerId>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
<groupId>org.sonatype.plugins</groupId>
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||||
|
@ -346,4 +328,32 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>deploy</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>1.6</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>sign-artifacts</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<keyname>${gpg.keyname}</keyname>
|
||||||
|
<passphraseServerId>${gpg.keyname}</passphraseServerId>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue