Merge build and publish jobs

This commit is contained in:
dotasek 2023-02-01 15:31:10 -05:00
parent 4384641d20
commit 50b27a0af3
1 changed files with 7 additions and 11 deletions

View File

@ -103,13 +103,15 @@ jobs:
Contents: "$(System.DefaultWorkingDirectory)/BRANCH" Contents: "$(System.DefaultWorkingDirectory)/BRANCH"
TargetFolder: '$(build.artifactstagingdirectory)' TargetFolder: '$(build.artifactstagingdirectory)'
displayName: Copy the branch name file to the artifact staging directory. displayName: Copy the branch name file to the artifact staging directory.
- job: buildaroni - job: build-and-publish-artifacts
# We're going to do a full build, including all unit and intergration tests. We do this here, before any # We're going to do a full build, including all unit and intergration tests. We do this here, before any
# actual release pipeilne kicks off, and we don't do it again at any point in the release pipeline. The assumption here # actual release pipeline kicks off, and we don't do it again at any point in the release pipeline. The assumption here
# is that once we pull the code, it won't change again on this branch until the release is complete. We # is that once we pull the code, it won't change again on this branch until the release is complete. We
# want to fail fast if there is an issue, and avoid running the tests more than once so it doesn't take all day. # want to fail fast if there is an issue, and avoid running the tests more than once so it doesn't take all day.
timeoutInMinutes: 360 timeoutInMinutes: 360
dependsOn: ['get_release_version', 'get_branch_id', 'check_release_notes'] dependsOn: ['get_release_version', 'get_branch_id', 'check_release_notes']
variables:
version_from_pom: $[ dependencies.get_release_version.outputs['setOutput.version_from_pom'] ]
steps: steps:
# Runs 'mvn clean package' # Runs 'mvn clean package'
- task: Maven@3 - task: Maven@3
@ -122,21 +124,15 @@ jobs:
publishJUnitResults: true publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml' testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package' goals: 'package'
- job: publish_build_artifacts # Publishes the built Validator jar to build artifacts. Primarily for testing and debugging builds.
timeoutInMinutes: 5
dependsOn: ['buildaroni', 'get_release_version']
variables:
version_from_pom: $[ dependencies.get_release_version.outputs['setOutput.version_from_pom'] ]
steps:
# Publishes the built Validator jar to build artifacts. Primarily for testing and debugging builds.
- task: PublishPipelineArtifact@1 - task: PublishPipelineArtifact@1
displayName: 'Publish Validator jar' displayName: 'Publish Validator jar'
inputs: inputs:
targetPath: "$(System.DefaultWorkingDirectory)/org.hl7.fhir.validation/target/org.hl7.fhir.validation-$(version_from_pom).jar" targetPath: "$(System.DefaultWorkingDirectory)/org.hl7.fhir.validation/target/org.hl7.fhir.validation-$(version_from_pom).jar"
artifactName: Validator artifactName: Validator
# Publishes the files we've moved into the staging directory, so they can be accessed by the
# release pipeline.
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
# Publishes the files we've moved into the staging directory, so they can be accessed by the
# release pipeline.
displayName: 'Publish Build Artifacts' displayName: 'Publish Build Artifacts'
inputs: inputs:
PathtoPublish: '$(build.artifactstagingdirectory)' PathtoPublish: '$(build.artifactstagingdirectory)'