2
2
# Licensed under the MIT License.
3
3
name : $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
4
4
parameters :
5
- - name : BuildAgent
6
- default : 1es-windows-ps-compute
7
- displayName : Build Agent
8
- - name : Test
9
- type : boolean
10
- default : true
11
- - name : Pack
12
- type : boolean
13
- default : true
14
- - name : Sign
15
- type : boolean
16
- default : true
5
+ - name : BuildAgent
6
+ default : 1es-windows-ps-compute-m
7
+ displayName : Build Agent
8
+ - name : Test
9
+ type : boolean
10
+ default : true
11
+ - name : Pack
12
+ type : boolean
13
+ default : true
14
+ - name : Sign
15
+ type : boolean
16
+ default : true
17
+ - name : InternalFeed
18
+ type : string
19
+ default : ' 0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build'
20
+ displayName : Internal NuGet Feed
21
+ values :
22
+ - ' 0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_v2'
23
+ - ' ATPopFeed'
24
+ - ' 0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build'
17
25
18
26
variables :
19
27
BuildAgent : ${{ parameters.BuildAgent }}
20
28
21
29
GitUserName : " Microsoft Graph DevX Tooling"
22
30
23
- pool : $(BuildAgent)
24
-
25
31
trigger :
26
32
branches :
27
33
include :
28
- - main
29
- - dev
34
+ - main
35
+ - dev
30
36
pr :
31
37
branches :
32
38
include :
33
- - main
34
- - dev
35
-
36
- jobs :
37
- - job : MsGraphPsSdkCiBuild
38
- displayName : Microsoft Graph PowerShell SDK CI Build
39
- timeoutInMinutes : 840
40
- steps :
41
- - script : |
42
- git submodule update --init --recursive
43
- - template : ./common-templates/install-tools.yml
44
- - template : ./common-templates/security-pre-checks.yml
45
-
46
- - template : ./generation-templates/authentication-module.yml
47
- parameters :
48
- Test : ${{ parameters.Test }}
49
- Pack : ${{ parameters.Pack }}
50
- Sign : ${{ parameters.Sign }}
39
+ - main
40
+ - dev
41
+ resources :
42
+ repositories :
43
+ - repository : 1ESPipelineTemplates
44
+ type : git
45
+ name : 1ESPipelineTemplates/1ESPipelineTemplates
46
+ ref : refs/tags/release
47
+ extends :
48
+ template : v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
49
+ parameters :
50
+ pool : $(BuildAgent)
51
+ sdl :
52
+ binskim :
53
+ enabled : false
54
+ justificationForDisabling : " Binskim keeps on crushing and failing the weekly build pipeline. Disabling it for now because we are unable to publish the artifacts to internal feeds."
55
+ credscan :
56
+ suppressionsFile : $(Build.SourcesDirectory)/.azure-pipelines/config/credscan/credscan-suppressions.json
57
+ policheck :
58
+ exclusionFile : $(Build.SourcesDirectory)/.azure-pipelines/config/policheck/policheck-exclusions.xml
59
+ customBuildTags :
60
+ - ES365AIMigrationTooling
61
+ stages :
62
+ - stage : stage
63
+ jobs :
64
+ - job : MsGraphPsSdkCiBuild
65
+ displayName : Microsoft Graph PowerShell SDK CI Build
66
+ timeoutInMinutes : 840
67
+ templateContext :
68
+ outputs :
69
+ - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }} :
70
+ - output : pipelineArtifact
71
+ displayName : ' Publish Module Artifacts'
72
+ targetPath : ' $(Build.ArtifactStagingDirectory)'
73
+ artifactName : ' drop'
74
+ publishLocation : ' Container'
75
+ steps :
76
+ - script : |
77
+ git submodule update --init --recursive
78
+ - template : .azure-pipelines/common-templates/install-tools.yml@self
79
+ - template : .azure-pipelines/common-templates/security-pre-checks.yml@self
80
+
81
+ - template : .azure-pipelines/generation-templates/authentication-module.yml@self
82
+ parameters :
83
+ Test : ${{ parameters.Test }}
84
+ Pack : ${{ parameters.Pack }}
85
+ Sign : ${{ parameters.Sign }}
51
86
52
- - template : ./generation-templates/workload-modules.yml
53
- parameters :
54
- Test : ${{ parameters.Test }}
55
- Pack : ${{ parameters.Pack }}
56
- Sign : ${{ parameters.Sign }}
87
+ - template : .azure-pipelines /generation-templates/workload-modules.yml@self
88
+ parameters :
89
+ Test : ${{ parameters.Test }}
90
+ Pack : ${{ parameters.Pack }}
91
+ Sign : ${{ parameters.Sign }}
57
92
58
- - template : ./generation-templates/meta-module.yml
59
- parameters :
60
- Test : ${{ parameters.Test }}
61
- Pack : ${{ parameters.Pack }}
62
- Sign : ${{ parameters.Sign }}
93
+ - template : .azure-pipelines /generation-templates/meta-module.yml@self
94
+ parameters :
95
+ Test : ${{ parameters.Test }}
96
+ Pack : ${{ parameters.Pack }}
97
+ Sign : ${{ parameters.Sign }}
63
98
64
- - template : ./common-templates/guardian-analyzer.yml
99
+ - template : .azure-pipelines /common-templates/guardian-analyzer.yml@self
65
100
66
- - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }} :
67
- - template : ./common-templates/esrp/codesign-nuget.yml
101
+ - ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }} :
102
+ - template : .azure-pipelines /common-templates/esrp/codesign-nuget.yml@self
68
103
parameters :
69
104
FolderPath : " $(Build.ArtifactStagingDirectory)"
70
105
Pattern : " Microsoft.Graph*.nupkg"
71
106
72
- - task : PublishBuildArtifacts@1
73
- displayName : Publish Module Artifacts
74
- inputs :
75
- PathtoPublish : " $(Build.ArtifactStagingDirectory)"
76
- ArtifactName : " drop"
77
- publishLocation : " Container"
107
+ - template : .azure-pipelines/common-templates/security-post-checks.yml@self
108
+ - stage : ' Deploy_to_Internal_Feed'
109
+ dependsOn : stage
110
+ jobs :
111
+ - deployment : ' DeployToInternalFeed'
112
+ displayName : ' Deploy to Internal Feed'
113
+ environment : ' PowerShellInternalFeed'
114
+ strategy :
115
+ runOnce :
116
+ deploy :
117
+ steps :
118
+ - checkout : self
119
+ - task : DownloadPipelineArtifact@2
120
+ displayName : ' Download Build Artifacts'
121
+ inputs :
122
+ buildType : ' current'
123
+ targetPath : ' $(System.DefaultWorkingDirectory)'
124
+ - task : 1ES.PublishNuget@1
125
+ displayName : ' Publish NuGet to feed'
126
+ inputs :
127
+ useDotNetTask : false
128
+ packageParentPath : ' $(System.DefaultWorkingDirectory)'
129
+ packagesToPush : ' $(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg'
130
+ publishVstsFeed : ${{ parameters.InternalFeed }}
131
+ nuGetFeedType : internal
132
+ allowPackageConflicts : true
133
+ - stage : ' Deploy_to_PsGallery'
134
+ dependsOn : stage
135
+ condition : and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Only deploy to PSGallery on main branch
136
+ jobs :
137
+ - deployment : ' DeployToPowerShellGallery'
138
+ displayName : ' Deploy to PowerShell Gallery'
139
+ environment : ' PowerShellGallery'
140
+ strategy :
141
+ runOnce :
142
+ deploy :
143
+ steps :
144
+ - checkout : self
145
+ - task : DownloadPipelineArtifact@2
146
+ displayName : ' Download Build Artifacts'
147
+ inputs :
148
+ buildType : ' current'
149
+ targetPath : ' $(System.DefaultWorkingDirectory)'
150
+ - task : 1ES.PublishNuget@1
151
+ displayName : ' Publish NuGet to feed'
152
+ inputs :
153
+ useDotNetTask : false
154
+ packageParentPath : ' $(System.DefaultWorkingDirectory)'
155
+ packagesToPush : ' $(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg'
156
+ nuGetFeedType : external
157
+ publishFeedCredentials : ' microsoftgraph PowerShell Gallery connection'
158
+
159
+
78
160
79
- - task : NuGetCommand@2
80
- displayName : Publish NuGet to feed
81
- inputs :
82
- command : push
83
- packagesToPush : $(Build.ArtifactStagingDirectory)/**/Microsoft.Graph.*.nupkg
84
- publishVstsFeed : $(PROJECT_NAME)/$(FEED_NAME)
85
- allowPackageConflicts : true
86
161
87
- - template : ./common-templates/security-post-checks.yml
162
+
0 commit comments