Skip to content

Commit b38f071

Browse files
committed
create and populate templates/build-stage
1 parent 69c21df commit b38f071

File tree

6 files changed

+68
-12
lines changed

6 files changed

+68
-12
lines changed

.azure-pipelines/buildAndPackage.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,53 @@ trigger:
2020
- THIRD PARTY NOTICES
2121
- README.md
2222

23-
pr: none
23+
pr: dev
2424

2525
pool:
26-
vmImage: ubuntu-latest
26+
vmImage: windows-latest
2727

28-
steps:
29-
- template: templates/secure-files.yml
30-
- template: templates/build-and-coverage.yml
31-
- template: templates/publish-artifacts.yml
32-
- template: templates/alert-failure.yml
28+
stages:
29+
- stage: Build
30+
jobs:
31+
- job: Build
32+
steps:
33+
- template: templates/build-stage/checkout-and-credscan.yml
34+
- template: templates/build-stage/install-java.yml
35+
- template: templates/build-stage/secure-files.yml
36+
- template: templates/build-stage/build-and-coverage.yml
37+
- template: templates/build-stage/publish-artifacts.yml
38+
- template: templates/alert-failure.yml
39+
40+
- stage: Maven-Preview
41+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/dev'))
42+
jobs:
43+
- job: Maven-Preview
44+
steps:
45+
- template:
46+
47+
- stage: Maven-Release-And-Git-Release
48+
dependsOn: []
49+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
50+
jobs:
51+
- deployment: Maven-Release
52+
environment: 'MSGraph SDK Development - Java'
53+
pool:
54+
vmImage: windows-latest
55+
strategy:
56+
runOnce:
57+
deploy:
58+
steps:
59+
- template:
60+
61+
- deployment: Github-Release
62+
dependsOn: Maven-Release
63+
environment: 'MSGraph SDK Development - Java'
64+
pool:
65+
vmImage: windows-latest
66+
strategy:
67+
runOnce:
68+
deploy:
69+
steps:
70+
- template:
3371

3472

.azure-pipelines/templates/build-and-coverage.yml renamed to .azure-pipelines/templates/build-stage/build-and-coverage.yml

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
steps:
2+
- checkout: self
3+
clean: true
4+
fetchDepth: 1
5+
6+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
7+
displayName: 'Run CredScan'
8+
inputs:
9+
debugMode: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- pwsh: 'Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.zip -OutFile OpenJDK.zip'
3+
displayName: 'Download JDK'
4+
5+
- task: JavaToolInstaller@0
6+
inputs:
7+
versionSpec: '16'
8+
jdkArchitectureOption: 'x64'
9+
jdkSourceOption: 'LocalDirectory'
10+
jdkFile: 'OpenJDK.zip'
11+
jdkDestinationDirectory: 'binaries'

.azure-pipelines/templates/publish-artifacts.yml renamed to .azure-pipelines/templates/build-stage/publish-artifacts.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ steps:
1515
Scripts/getLatestVersion.ps1
1616
TargetFolder: '$(build.artifactstagingdirectory)/'
1717

18-
- task: PublishBuildArtifacts@1
19-
inputs:
20-
PathtoPublish: '$(build.artifactstagingdirectory)'
21-
ArtifactName: 'drop'
22-
publishLocation: 'Container'
18+
- publish: $(Build.ArtifactStagingDirectory)
19+
artifact: Drop
20+
displayName: Publish Build Artifact
File renamed without changes.

0 commit comments

Comments
 (0)