Skip to content

Commit 9e65b27

Browse files
PIE Easy StartKotanaSai21
authored andcommitted
Merged PR 309729: Adding OneBranch pipeline YAML config file for powerbi-javascript-Official
Generate OneBranch Pipeline YAML config files. This pull request is initially auto-generated by Easy Start, for more details, please visit our [wiki](https://aka.ms/easystart). **Result of OneBranch Official Pipeline** https://dev.azure.com/powerbi/Embedded/_build/results?buildId=6042686&view=results Related work items: #972391
1 parent 878612f commit 9e65b27

File tree

2 files changed

+198
-3
lines changed

2 files changed

+198
-3
lines changed

.pipelines/OneBranch.Buddy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ parameters: # parameters are shown up in ADO UI in a build queue time
1717
default: false
1818

1919
variables:
20-
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
2120
system.debug: ${{ parameters.debug }}
2221
ENABLE_PRS_DELAYSIGN: 1
2322
ROOT: $(Build.SourcesDirectory)
2423
REPOROOT: $(Build.SourcesDirectory)
2524
OUTPUTROOT: $(REPOROOT)\out
2625
NUGET_XMLDOC_MODE: skip
2726

28-
WindowsContainerImage: 'cdpxwin1809.azurecr.io/global/obinfra/windows/1809/vs2019:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
27+
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
2928

3029
resources:
3130
repositories:
@@ -52,9 +51,10 @@ extends:
5251

5352
variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
5453
ob_outputDirectory: '$(OUTPUTROOT)' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
55-
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sd
54+
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sdl
5655
ob_artifactBaseName: 'drop'
5756
ob_sdl_cg_failOnAlert: false
57+
ob_sdl_codeSignValidation_excludes: 'regex|.+(?:exe|dll)$;-|*.nd.dll;-|.gdn\**'
5858

5959
steps:
6060
# Custom Versioning - we will build the version using package.json in versioning commands.
@@ -95,6 +95,15 @@ extends:
9595
filePath: '$(Build.SourcesDirectory)\.pipelines\build.ps1'
9696
workingDirectory: '$(Build.SourcesDirectory)'
9797

98+
- task: onebranch.pipeline.signing@1
99+
displayName: 'Sign binaries'
100+
inputs:
101+
command: 'sign'
102+
signing_environment: 'azure-ado'
103+
signing_profile: 'internal_azure_service'
104+
files_to_sign: 'dist\**\*'
105+
search_root: '$(Build.SourcesDirectory)'
106+
98107
- task: PowerShell@2
99108
displayName: 'Package'
100109
inputs:

.pipelines/OneBranch.Official.yml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
#################################################################################
2+
# Onebranch Pipelines - Official MSBuild (CDPXMigrated) #
3+
# This pipeline was created by EasyStart from a sample located at: #
4+
# https://aka.ms/obpipelines/easystart/samples #
5+
# Documentation: https://aka.ms/obpipelines #
6+
# Yaml Schema: https://aka.ms/obpipelines/yaml/schema #
7+
# Retail Tasks: https://aka.ms/obpipelines/tasks #
8+
# Support: https://aka.ms/onebranchsup #
9+
#################################################################################
10+
11+
trigger: none # https://aka.ms/obpipelines/triggers
12+
13+
parameters: # parameters are shown up in ADO UI in a build queue time
14+
- name: 'debug'
15+
displayName: 'Enable debug output'
16+
type: boolean
17+
default: false
18+
19+
variables:
20+
system.debug: ${{ parameters.debug }}
21+
ENABLE_PRS_DELAYSIGN: 1
22+
ROOT: $(Build.SourcesDirectory)
23+
REPOROOT: $(Build.SourcesDirectory)
24+
OUTPUTROOT: $(REPOROOT)\out
25+
NUGET_XMLDOC_MODE: skip
26+
${{ if eq(variables['Build.DefinitionName'], 'powerbi-javascript-Official') }}:
27+
obpTemplate: v2/OneBranch.Official.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
28+
${{ else }}:
29+
obpTemplate: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
30+
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
31+
32+
resources:
33+
repositories:
34+
- repository: templates
35+
type: git
36+
name: OneBranch.Pipelines/GovernedTemplates
37+
ref: refs/heads/main
38+
39+
extends:
40+
template: ${{ variables.obpTemplate }}
41+
parameters:
42+
globalSdl: # https://aka.ms/obpipelines/sdl
43+
tsa:
44+
enabled: false
45+
cg:
46+
failOnAlert: false
47+
48+
stages:
49+
- stage: build
50+
jobs:
51+
- job: main
52+
pool:
53+
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
54+
55+
variables:
56+
ob_outputDirectory: '$(OUTPUTROOT)' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
57+
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sdl
58+
ob_artifactBaseName: 'drop'
59+
ob_sdl_cg_failOnAlert: false
60+
ob_sdl_codeSignValidation_excludes: 'regex|.+(?:exe|dll)$;-|*.nd.dll;-|.gdn\**'
61+
62+
steps:
63+
# Custom Versioning - we will build the version using package.json in versioning commands.
64+
- task: PowerShell@2
65+
displayName: 'Set Version'
66+
inputs:
67+
targetType: 'filePath'
68+
filePath: '$(Build.SourcesDirectory)\.pipelines\version.ps1'
69+
workingDirectory: '$(Build.SourcesDirectory)'
70+
71+
# Add the versioning task after running Version script
72+
- task: onebranch.pipeline.version@1
73+
inputs:
74+
system: 'Custom'
75+
customVersion: '$(CustomBuildNumber)'
76+
77+
- task: NodeTool@0
78+
displayName: 'Install Node.js'
79+
inputs:
80+
versionSpec: '16.x'
81+
82+
- task: npmAuthenticate@0
83+
displayName: 'NPM Authenticate'
84+
inputs:
85+
workingFile: '$(Build.SourcesDirectory)/.npmrc'
86+
87+
- task: PowerShell@2
88+
displayName: 'Restore'
89+
inputs:
90+
targetType: 'filePath'
91+
filePath: '$(Build.SourcesDirectory)\.pipelines\restore.ps1'
92+
workingDirectory: '$(Build.SourcesDirectory)'
93+
94+
- task: PowerShell@2
95+
displayName: 'Build'
96+
inputs:
97+
targetType: 'filePath'
98+
filePath: '$(Build.SourcesDirectory)\.pipelines\build.ps1'
99+
workingDirectory: '$(Build.SourcesDirectory)'
100+
101+
- task: onebranch.pipeline.signing@1
102+
displayName: 'Sign binaries'
103+
inputs:
104+
command: 'sign'
105+
signing_environment: 'azure-ado'
106+
signing_profile: 'internal_azure_service'
107+
files_to_sign: 'dist\**\*'
108+
search_root: '$(Build.SourcesDirectory)'
109+
110+
- task: PowerShell@2
111+
displayName: 'Package'
112+
inputs:
113+
targetType: 'filePath'
114+
filePath: '$(Build.SourcesDirectory)\.pipelines\package.ps1'
115+
workingDirectory: '$(Build.SourcesDirectory)'
116+
117+
- task: NuGetToolInstaller@1
118+
displayName: 'Install Nuget'
119+
inputs:
120+
versionSpec: '*'
121+
checkLatest: true
122+
123+
- task: PowerShell@2
124+
displayName: 'Nuget Package'
125+
inputs:
126+
targetType: 'filePath'
127+
filePath: '$(Build.SourcesDirectory)\.pipelines\nuget_pack.ps1'
128+
workingDirectory: '$(Build.SourcesDirectory)'
129+
130+
# Copying build artifacts to the Output folder
131+
- task: CopyFiles@2
132+
displayName: 'Copy Dist to Output folder'
133+
inputs:
134+
SourceFolder: $(Build.SourcesDirectory)
135+
Contents: |
136+
dist\**\*
137+
LICENSE.txt
138+
package.json
139+
README.md
140+
TargetFolder: '$(OUTPUTROOT)\outputs\build\build_artifacts'
141+
142+
# Copying source artifacts to the Output folder
143+
- task: CopyFiles@2
144+
displayName: 'Copy source to Output folder'
145+
inputs:
146+
SourceFolder: $(Build.SourcesDirectory)
147+
Contents: |
148+
**\*
149+
!.pipelines\**\*
150+
!.vscode\**\*
151+
!demo\**\*
152+
!dist\**\*
153+
!node_modules\**\*
154+
!**\out\**\*
155+
!**\test\**\*.*
156+
!**\*.tgz
157+
!**\**.nupkg
158+
TargetFolder: '$(OUTPUTROOT)\outputs\build\source'
159+
160+
# Copying tgz package to the Output folder.
161+
- task: CopyFiles@2
162+
displayName: 'Copy tgz-package to Output folder'
163+
inputs:
164+
SourceFolder: $(Build.SourcesDirectory)
165+
Contents: |
166+
*.tgz
167+
TargetFolder: '$(OUTPUTROOT)\outputs\package\tgz-package'
168+
169+
# Copying nuget pack to the Output folder
170+
- task: CopyFiles@2
171+
displayName: 'Copy nuget pack to Output folder'
172+
inputs:
173+
SourceFolder: $(Build.SourcesDirectory)
174+
Contents: |
175+
Microsoft.PowerBI.JavaScript.*.nupkg
176+
TargetFolder: '$(OUTPUTROOT)\outputs\package\Release'
177+
178+
# Signing the files created by the build and packaging script
179+
- task: onebranch.pipeline.signing@1
180+
displayName: 'Sign binaries'
181+
inputs:
182+
command: 'sign'
183+
signing_environment: 'azure-ado'
184+
signing_profile: 'internal_azure_service'
185+
files_to_sign: '**'
186+
search_root: '$(OUTPUTROOT)'

0 commit comments

Comments
 (0)