2019-07-13 01:37:17 +03:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- feature/*
|
|
|
|
- release/*
|
|
|
|
- hotfix/*
|
|
|
|
|
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- feature/*
|
|
|
|
- release/*
|
|
|
|
- hotfix/*
|
|
|
|
|
2024-04-13 00:44:05 +03:00
|
|
|
parameters:
|
|
|
|
- name: CopyToPartnerDrops
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
- name: VersionNumber
|
|
|
|
type: string
|
|
|
|
default: "<invalid-version-number>"
|
|
|
|
|
2024-04-09 02:36:14 +03:00
|
|
|
variables:
|
|
|
|
- name: TargetFolderName
|
|
|
|
value: $(Build.ArtifactStagingDirectory)/artifacts
|
|
|
|
|
2024-03-29 00:52:54 +03:00
|
|
|
extends:
|
|
|
|
template: /eng/templates/1es-redirect.yml
|
|
|
|
parameters:
|
|
|
|
stages:
|
|
|
|
- stage: Build
|
|
|
|
variables:
|
|
|
|
- name: DefaultOptions
|
|
|
|
value: '--batch-mode --fail-at-end -Dmaven.wagon.http.pool=false'
|
|
|
|
- name: LoggingOptions
|
|
|
|
value: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
|
|
|
|
- name: MemoryOptions
|
|
|
|
value: '-Xmx3072m'
|
|
|
|
- template: /eng/templates/image.yml
|
|
|
|
jobs:
|
|
|
|
- job: 'Build'
|
|
|
|
pool:
|
|
|
|
name: $(LINUXPOOL)
|
|
|
|
image: $(LINUXVMIMAGE)
|
|
|
|
os: linux
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Java 8:
|
|
|
|
ArtifactName: 'java8-packages'
|
|
|
|
ProfileFlag: '-Djava8'
|
|
|
|
JavaVersion: '1.8'
|
|
|
|
# We name this 'packages' because it is the default version we want to ship with.
|
|
|
|
Java LTS:
|
|
|
|
ArtifactName: 'packages'
|
|
|
|
ProfileFlag: '-Djava-lts'
|
|
|
|
JavaVersion: '1.11'
|
|
|
|
|
|
|
|
steps:
|
2024-04-09 02:36:14 +03:00
|
|
|
# Build and deploy into "${project.basedir}/output" folder.
|
2024-03-29 00:52:54 +03:00
|
|
|
- task: Maven@3
|
|
|
|
displayName: 'Build and Package'
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: 'pom.xml'
|
|
|
|
goals: 'deploy'
|
2024-04-03 22:15:13 +03:00
|
|
|
options: '$(DefaultOptions) $(ProfileFlag) -T 1C -DskipTests -Dgpg.skip -Dcheckstyle.skip=true -Dspotbugs.skip=true --settings eng/settings.xml -DaltDeploymentRepository="local::default::file:///${project.basedir}/output"'
|
2024-03-29 00:52:54 +03:00
|
|
|
mavenOptions: '$(LoggingOptions) $(MemoryOptions)'
|
|
|
|
javaHomeOption: 'JDKVersion'
|
|
|
|
jdkVersionOption: $(JavaVersion)
|
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: false
|
|
|
|
|
|
|
|
- task: Maven@3
|
|
|
|
displayName: 'Run SpotBugs, Checkstyle, and Javadoc'
|
|
|
|
inputs:
|
|
|
|
mavenPomFile: pom.xml
|
|
|
|
options: '$(DefaultOptions) --no-transfer-progress -DskipTests -Dgpg.skip'
|
|
|
|
mavenOptions: '$(MemoryOptions)'
|
|
|
|
javaHomeOption: 'JDKVersion'
|
|
|
|
jdkVersionOption: $(JavaVersion)
|
|
|
|
jdkArchitectureOption: 'x64'
|
|
|
|
publishJUnitResults: false
|
|
|
|
goals: 'verify'
|
|
|
|
|
|
|
|
- script: |
|
2024-04-09 02:36:14 +03:00
|
|
|
mkdir $(TargetFolderName)
|
|
|
|
cp output/com/microsoft/azure/qpid-proton-j-extensions/**/* $(TargetFolderName)
|
|
|
|
rm $(TargetFolderName)/*.sha1
|
|
|
|
rm $(TargetFolderName)/*.md5
|
2024-03-29 00:52:54 +03:00
|
|
|
displayName: Flatten and copy build outputs
|
|
|
|
|
|
|
|
- task: 1ES.PublishPipelineArtifact@1
|
|
|
|
displayName: 'Publish outputs to $(ArtifactName) artifact'
|
|
|
|
inputs:
|
|
|
|
artifactName: $(ArtifactName)
|
|
|
|
targetPath: $(Build.ArtifactStagingDirectory)
|
|
|
|
|
|
|
|
- job:
|
|
|
|
displayName: 'Test'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Linux - Java 8:
|
|
|
|
OSName: 'Linux'
|
|
|
|
OSVmImage: 'ubuntu-22.04'
|
|
|
|
ProfileFlag: '-Djava8'
|
|
|
|
JavaVersion: '1.8'
|
|
|
|
Linux - Java LTS:
|
|
|
|
OSName: 'Linux'
|
|
|
|
OSVmImage: 'ubuntu-22.04'
|
|
|
|
ProfileFlag: '-Djava-lts'
|
|
|
|
JavaVersion: '1.11'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
name: $(LINUXPOOL)
|
|
|
|
image: $(LINUXVMIMAGE)
|
|
|
|
os: linux
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: /eng/templates/test-steps.yml
|
|
|
|
|
|
|
|
- job:
|
|
|
|
displayName: 'Test'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Windows - Java 8:
|
|
|
|
OSName: 'Windows'
|
|
|
|
OSVmImage: 'windows-2022'
|
|
|
|
ProfileFlag: '-Djava8'
|
|
|
|
JavaVersion: '1.8'
|
|
|
|
Windows - Java LTS:
|
|
|
|
OSName: 'Windows'
|
|
|
|
OSVmImage: 'windows-2022'
|
|
|
|
ProfileFlag: '-Djava-lts'
|
|
|
|
JavaVersion: '1.11'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
name: $(WINDOWSPOOL)
|
|
|
|
image: $(WINDOWSVMIMAGE)
|
|
|
|
os: windows
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- template: /eng/templates/test-steps.yml
|
|
|
|
|
|
|
|
- job:
|
|
|
|
displayName: 'Test'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
macOS - Java 8:
|
|
|
|
OSName: 'macOS'
|
|
|
|
OSVmImage: 'macOS-13'
|
|
|
|
ProfileFlag: '-Djava8'
|
|
|
|
JavaVersion: '1.8'
|
|
|
|
macOS - Java LTS:
|
|
|
|
OSName: 'macOS'
|
|
|
|
OSVmImage: 'macOS-13'
|
|
|
|
ProfileFlag: '-Djava-lts'
|
|
|
|
JavaVersion: '1.11'
|
|
|
|
|
|
|
|
pool:
|
|
|
|
name: $(MACPOOL)
|
|
|
|
vmImage: $(MACVMIMAGE)
|
|
|
|
os: macOS
|
|
|
|
|
|
|
|
steps:
|
2024-04-13 00:44:05 +03:00
|
|
|
- template: /eng/templates/test-steps.yml
|
|
|
|
|
|
|
|
- ${{ if and(eq(parameters.CopyToPartnerDrops, true), ne(parameters.VersionNumber, '<invalid-version-number>')) }}:
|
|
|
|
- stage: Deploy
|
|
|
|
dependsOn: Build
|
|
|
|
jobs:
|
|
|
|
- job:
|
|
|
|
displayName: 'Copy to partner drop'
|
|
|
|
pool:
|
|
|
|
name: $(LINUXPOOL)
|
|
|
|
image: $(LINUXVMIMAGE)
|
|
|
|
os: linux
|
|
|
|
steps:
|
|
|
|
- download: current
|
|
|
|
# Make sure this matches up with the Java LTS artifact name in line 49.
|
|
|
|
artifact: packages
|
|
|
|
|
|
|
|
- task: AzureFileCopy@6
|
|
|
|
inputs:
|
|
|
|
SourcePath: '$(Pipeline.Workspace)/packages/artifacts'
|
|
|
|
azureSubscription: 'azuresdkpartnerdrops-kv Secrets'
|
|
|
|
Destination: 'AzureBlob'
|
|
|
|
storage: 'azuresdkscratch'
|
|
|
|
ContainerName: 'drops'
|
|
|
|
BlobPrefix: 'qpid-proton-j-extensions/java/${{ parameters.VersionNumber }}'
|