Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
404957f
added the maven preview and release stages to buildAndPackage.yml as …
ramsessanchez Aug 4, 2021
e95e45b
add stage dependencies to release stages
ramsessanchez Aug 4, 2021
517a7b8
Remove 'stage' suffix from Stage names.
ramsessanchez Aug 4, 2021
76f61dc
add conditions to the maven release stage
ramsessanchez Aug 4, 2021
269c830
instances of /_msgraph-sdk-java-core build and package/drop changed t…
ramsessanchez Aug 4, 2021
ad182d5
added download-artifacts template, modified publish artifacts, both n…
ramsessanchez Aug 5, 2021
a2b6f32
added validation request for release stage
ramsessanchez Aug 5, 2021
4fe5d40
Update buildAndPackage.yml
ramsessanchez Aug 6, 2021
d46525b
Bump azure-core from 1.18.0 to 1.19.0
dependabot[bot] Aug 9, 2021
ed99256
Bump azure-core from 1.18.0 to 1.19.0
dependabot[bot] Aug 9, 2021
1d8a536
Merge pull request #264 from microsoftgraph/dependabot/maven/com.azur…
baywet Aug 9, 2021
59ec51a
Merge pull request #263 from microsoftgraph/dependabot/gradle/com.azu…
baywet Aug 9, 2021
8974990
Update buildAndPackage.yml for Azure Pipelines
ramsessanchez Aug 10, 2021
425987f
using 'publish' keyword to implicitly call publishPipelineArtifact task
ramsessanchez Aug 10, 2021
543f75c
removed implicit streps included in deployment-job
ramsessanchez Aug 10, 2021
1705e2c
propose to put maven and github release into a single stage
ramsessanchez Aug 10, 2021
3b2d368
Update buildAndPackage.yml
ramsessanchez Aug 12, 2021
260fe8c
Update buildAndPackage.yml for Azure Pipelines
ramsessanchez Aug 12, 2021
fcbfa0c
Update buildAndPackage.yml
ramsessanchez Aug 13, 2021
2277888
removed 'stage' suffix from folder names
ramsessanchez Aug 13, 2021
1ab2c15
file path changes to highlight suffix removal
ramsessanchez Aug 13, 2021
634c392
template parameters for secure-files.yml
ramsessanchez Aug 13, 2021
f9d2941
parameter for copy-and-build, now a single file
ramsessanchez Aug 13, 2021
ba66e93
preview stage now uses a deployment job, download-artifacts.yml and c…
ramsessanchez Aug 13, 2021
6901b5c
github connection now a parameter, removed git-release folder since i…
ramsessanchez Aug 13, 2021
12a22f0
param update
ramsessanchez Aug 13, 2021
33a1c63
Update version-and-release.yml
ramsessanchez Aug 13, 2021
21c183b
Update secure-files.yml
ramsessanchez Aug 13, 2021
12917ea
updated paths in prValidate.yml which were preventing pipeline from r…
ramsessanchez Aug 16, 2021
e12d853
- removes obsolete PR validate pipeline
baywet Aug 16, 2021
9a80e07
Merge pull request #257 from microsoftgraph/rsh/deploymentStagesYml
baywet Aug 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 64 additions & 7 deletions .azure-pipelines/buildAndPackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,67 @@ pr: none
pool:
vmImage: windows-latest

steps:
- template: templates/checkout-and-credscan.yml
- template: templates/install-java.yml
- template: templates/secure-files.yml
- template: templates/build-and-coverage.yml
- template: templates/publish-artefacts.yml
- template: templates/alert-failure.yml
stages:
- stage: Build
jobs:
- job: Build
steps:
- template: templates/build/checkout-and-credscan.yml
- template: templates/build/install-java.yml
- template: templates/secure-files.yml
parameters:
stageID: 'build'
- template: templates/build/build-and-coverage.yml
- template: templates/build/publish-artefacts.yml
- template: templates/alert-failure.yml

- stage: Maven-Preview
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
jobs:
- deployment: Maven-Preview
environment: 'MSGraph SDK Development - Java'
pool:
vmImage: windows-latest
strategy:
runOnce:
deploy:
steps:
- template: templates/secure-files.yml
- template: templates/copy-and-build.yml
parameters:
task: 'publishSnapshotPublicationToSonatypeSnapshotRepository'
- template: templates/alert-failure.yml

- stage: Maven-Release-And-Github-Release
dependsOn: []
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- deployment: Maven-Release
environment: 'MSGraph SDK Development - Java'
pool:
vmImage: windows-latest
strategy:
runOnce:
deploy:
steps:
- template: templates/secure-files.yml
parameters:
stageID: 'release'
- template: templates/copy-and-build.yml
parameters:
task: 'publishMavenCentralReleasePublicationToSonatypeRepository'
- template: templates/alert-failure.yml

- deployment: Github-Release
dependsOn: Maven-Release
environment: 'MSGraph SDK Development - Java'
pool:
vmImage: windows-latest
strategy:
runOnce:
deploy:
steps:
- template: templates/version-and-release.yml
parameters:
gitConnection: 'ramsessanchez'
- template: templates/alert-failure.yml
35 changes: 0 additions & 35 deletions .azure-pipelines/prValidate.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ steps:
Scripts/**
TargetFolder: '$(Build.ArtifactStagingDirectory)/'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
- publish: $(Build.ArtifactStagingDirectory)
artifact: Drop
displayName: Publish Build Artifact
23 changes: 23 additions & 0 deletions .azure-pipelines/templates/copy-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
parameters:
- name: task
type: string
default: ''

steps:
- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**'
TargetFolder: '$(DROP_PATH)/'

- task: Gradle@2
inputs:
gradleWrapperFile: '$(DROP_PATH)/gradlew'
workingDirectory: '$(DROP_PATH)'
options: '-x jar -x javadoc -x javadocJar -x compileJava -x processResources -x classes -x sourceJar'
tasks: ${{ parameters.task }}
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
javaHomeOption: 'JDKVersion'
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
33 changes: 22 additions & 11 deletions .azure-pipelines/templates/secure-files.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
parameters:
- name: stageID
type: string
default: ''

steps:
- task: DownloadSecureFile@1
inputs:
secureFile: 'local.properties'
retryCount: '5'

- task: DownloadSecureFile@1
inputs:
secureFile: 'secring.gpg'
- ${{ if or(eq(parameters.stageID, 'build'), eq(parameters.stageID, 'release') }}:
- task: DownloadSecureFile@1
inputs:
secureFile: 'secring.gpg'
retryCount: '5'

- task: DownloadSecureFile@1
inputs:
secureFile: 'secring.gpg.lock'
retryCount: '5'

- task: DownloadSecureFile@1
inputs:
secureFile: 'secring.gpg.lock'
- ${{ if eq(parameters.stageID, 'build') }}:
- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**'
TargetFolder: '$(System.DefaultWorkingDirectory)'

- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**'
TargetFolder: '$(System.DefaultWorkingDirectory)'
24 changes: 24 additions & 0 deletions .azure-pipelines/templates/version-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
parameters:
- name: gitConnection
type: string
default: ''

steps:
- task: PowerShell@2
inputs:
filePath: '$(DROP_PATH)/Scripts/getLatestVersion.ps1'
arguments: '-propertiesPath "$(PROPERTIES_PATH)"'

- task: GitHubRelease@1
inputs:
gitHubConnection: ${{ parameters.gitConnection }}
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(VERSION_STRING)'
assets: |
!**/**
$(Build.ArtifactStagingDirectory)/*
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dependencies {
implementation 'com.google.guava:guava:30.1.1-jre'

implementation 'com.google.code.gson:gson:2.8.7'
api 'com.azure:azure-core:1.18.0'
api 'com.azure:azure-core:1.19.0'
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.18.0</version>
<version>1.19.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down