Skip to content

Commit

Permalink
Merge pull request #23 from Azure/feature/unified-pipeline
Browse files Browse the repository at this point in the history
Feature/unified pipeline
  • Loading branch information
mitchdenny authored Aug 1, 2019
2 parents f5c2326 + 6e140b9 commit 6cb9118
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 8 deletions.
37 changes: 29 additions & 8 deletions ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java

resources:
repositories:
- repository: azure-sdk-build-tools
type: git
name: internal/azure-sdk-build-tools

trigger:
branches:
include:
Expand Down Expand Up @@ -47,19 +53,24 @@ stages:
displayName: 'Build and Package'
inputs:
mavenPomFile: 'pom.xml'
goals: 'package'
options: '$(DefaultOptions) $(ProfileFlag) "-DpackageOutputDirectory=$(Build.ArtifactStagingDirectory)" -Dmaven.test.skip=true'
goals: 'deploy'
options: '$(DefaultOptions) $(ProfileFlag) -DaltDeploymentRepository="local::default::file:///${project.basedir}/output" -Dmaven.test.skip=true --settings eng/settings.xml'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false

- task: PublishPipelineArtifact@0
displayName: 'Publish Artifacts $(ArtifactName)'
inputs:
artifactName: '$(ArtifactName)'
targetPath: $(Build.ArtifactStagingDirectory)
- script: |
cp output/com/microsoft/azure/qpid-proton-j-extensions/**/* $(Build.ArtifactStagingDirectory)
rm $(Build.ArtifactStagingDirectory)/*.sha1
rm $(Build.ArtifactStagingDirectory)/*.md5
displayName: Flatten and copy build outputs
- publish: $(Build.ArtifactStagingDirectory)
artifact: $(ArtifactName)
displayName: 'Publish outputs to $(ArtifactName) artifact'

- job: 'Test'

Expand Down Expand Up @@ -104,7 +115,7 @@ stages:
displayName: 'Run Tests'
inputs:
mavenPomFile: 'pom.xml'
options: '$(DefaultOptions) $(ProfileFlag)'
options: '$(DefaultOptions) $(ProfileFlag) --settings eng/settings.xml'
mavenOptions: '-Xmx3072m $(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: $(JavaVersion)
Expand All @@ -117,3 +128,13 @@ stages:
inputs:
mergeTestResults: true
testRunTitle: '$(OSName) on Java $(JavaVersion)'

# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- template: pipelines/stages/archetype-java-release.yml@azure-sdk-build-tools
parameters:
DependsOn: Build
ArtifactName: packages
Artifacts:
- name: qpid-proton-j-extensions
safeName: qpidprotonjextensions
11 changes: 11 additions & 0 deletions eng/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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">
<mirrors>
<mirror>
<id>repo-maven-apache-org-mirror</id>
<url>https://repo-maven-apache-org.azurefd.net/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@

<url>https://github.com/Azure/qpid-proton-j-extensions</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<developers>
<developer>
<id>microsoft</id>
<name>Microsoft Corporation</name>
</developer>
</developers>

<scm>
<url>https://github.com/Azure/qpid-proton-j-extensions</url>
<connection>scm:git:https://github.com/Azure/qpid-proton-j-extensions.git</connection>
<developerConnection>scm:git:https://github.com/Azure/qpid-proton-j-extensions.git</developerConnection>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<packageOutputDirectory>${project.build.directory}</packageOutputDirectory>
Expand Down

0 comments on commit 6cb9118

Please sign in to comment.