Update azure-pipelines with new OS images and restricted version publishing.
This commit is contained in:
parent
74c8ba0580
commit
156fc08e10
|
@ -10,11 +10,11 @@ pr:
|
|||
strategy:
|
||||
matrix:
|
||||
linux:
|
||||
imageName: "ubuntu-16.04"
|
||||
# mac:
|
||||
# imageName: "macos-10.14"
|
||||
# windows:
|
||||
# imageName: "vs2017-win2016"
|
||||
imageName: 'ubuntu-latest'
|
||||
mac:
|
||||
imageName: "macos-10.15"
|
||||
windows:
|
||||
imageName: "wondows-2019"
|
||||
maxParallel: 3
|
||||
|
||||
pool:
|
||||
|
@ -26,11 +26,10 @@ variables:
|
|||
VERSION:
|
||||
|
||||
steps:
|
||||
- bash: ls -la
|
||||
- bash: pwd
|
||||
# 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: |
|
||||
|
@ -42,6 +41,7 @@ steps:
|
|||
|
||||
# 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.
|
||||
|
@ -51,12 +51,12 @@ steps:
|
|||
echo $(version)
|
||||
VERSION=$(version)
|
||||
echo "$VERSION" > $(System.DefaultWorkingDirectory)/VERSION
|
||||
condition: and(eq(variables.currentImage, 'ubuntu-16.04'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
||||
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-16.04'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
||||
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
|
||||
inputs:
|
||||
SourceFolder: '$(System.Defaultworkingdirectory)'
|
||||
|
@ -73,12 +73,12 @@ steps:
|
|||
jdkArchitectureOption: 'x64'
|
||||
publishJUnitResults: true
|
||||
testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
||||
goals: 'clean package'
|
||||
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-16.04'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
||||
|
||||
# Publishes the test results to build artifacts.
|
||||
- task: PublishCodeCoverageResults@1
|
||||
|
@ -87,12 +87,12 @@ steps:
|
|||
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-16.04'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
||||
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-16.04'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
||||
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
|
||||
|
@ -102,7 +102,7 @@ steps:
|
|||
# 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-16.04'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
||||
condition: and(eq(variables.currentImage, 'ubuntu-latest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
|
||||
displayName: 'Publish Build Artifacts'
|
||||
inputs:
|
||||
PathtoPublish: '$(build.artifactstagingdirectory)'
|
||||
|
|
Loading…
Reference in New Issue