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
This commit is contained in:
PIE Easy Start 2022-12-26 07:19:54 +00:00 коммит произвёл Kotana Sai
Родитель 878612ff70
Коммит 9e65b27942
2 изменённых файлов: 198 добавлений и 3 удалений

Просмотреть файл

@ -17,7 +17,6 @@ parameters: # parameters are shown up in ADO UI in a build queue time
default: false
variables:
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
system.debug: ${{ parameters.debug }}
ENABLE_PRS_DELAYSIGN: 1
ROOT: $(Build.SourcesDirectory)
@ -25,7 +24,7 @@ variables:
OUTPUTROOT: $(REPOROOT)\out
NUGET_XMLDOC_MODE: skip
WindowsContainerImage: 'cdpxwin1809.azurecr.io/global/obinfra/windows/1809/vs2019:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
resources:
repositories:
@ -52,9 +51,10 @@ extends:
variables: # More settings at https://aka.ms/obpipelines/yaml/jobs
ob_outputDirectory: '$(OUTPUTROOT)' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sd
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sdl
ob_artifactBaseName: 'drop'
ob_sdl_cg_failOnAlert: false
ob_sdl_codeSignValidation_excludes: 'regex|.+(?:exe|dll)$;-|*.nd.dll;-|.gdn\**'
steps:
# Custom Versioning - we will build the version using package.json in versioning commands.
@ -95,6 +95,15 @@ extends:
filePath: '$(Build.SourcesDirectory)\.pipelines\build.ps1'
workingDirectory: '$(Build.SourcesDirectory)'
- task: onebranch.pipeline.signing@1
displayName: 'Sign binaries'
inputs:
command: 'sign'
signing_environment: 'azure-ado'
signing_profile: 'internal_azure_service'
files_to_sign: 'dist\**\*'
search_root: '$(Build.SourcesDirectory)'
- task: PowerShell@2
displayName: 'Package'
inputs:

Просмотреть файл

@ -0,0 +1,186 @@
#################################################################################
# Onebranch Pipelines - Official MSBuild (CDPXMigrated) #
# This pipeline was created by EasyStart from a sample located at: #
# https://aka.ms/obpipelines/easystart/samples #
# Documentation: https://aka.ms/obpipelines #
# Yaml Schema: https://aka.ms/obpipelines/yaml/schema #
# Retail Tasks: https://aka.ms/obpipelines/tasks #
# Support: https://aka.ms/onebranchsup #
#################################################################################
trigger: none # https://aka.ms/obpipelines/triggers
parameters: # parameters are shown up in ADO UI in a build queue time
- name: 'debug'
displayName: 'Enable debug output'
type: boolean
default: false
variables:
system.debug: ${{ parameters.debug }}
ENABLE_PRS_DELAYSIGN: 1
ROOT: $(Build.SourcesDirectory)
REPOROOT: $(Build.SourcesDirectory)
OUTPUTROOT: $(REPOROOT)\out
NUGET_XMLDOC_MODE: skip
${{ if eq(variables['Build.DefinitionName'], 'powerbi-javascript-Official') }}:
obpTemplate: v2/OneBranch.Official.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
${{ else }}:
obpTemplate: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers
resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
extends:
template: ${{ variables.obpTemplate }}
parameters:
globalSdl: # https://aka.ms/obpipelines/sdl
tsa:
enabled: false
cg:
failOnAlert: false
stages:
- stage: build
jobs:
- job: main
pool:
type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs
variables:
ob_outputDirectory: '$(OUTPUTROOT)' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts
ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sdl
ob_artifactBaseName: 'drop'
ob_sdl_cg_failOnAlert: false
ob_sdl_codeSignValidation_excludes: 'regex|.+(?:exe|dll)$;-|*.nd.dll;-|.gdn\**'
steps:
# Custom Versioning - we will build the version using package.json in versioning commands.
- task: PowerShell@2
displayName: 'Set Version'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\.pipelines\version.ps1'
workingDirectory: '$(Build.SourcesDirectory)'
# Add the versioning task after running Version script
- task: onebranch.pipeline.version@1
inputs:
system: 'Custom'
customVersion: '$(CustomBuildNumber)'
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '16.x'
- task: npmAuthenticate@0
displayName: 'NPM Authenticate'
inputs:
workingFile: '$(Build.SourcesDirectory)/.npmrc'
- task: PowerShell@2
displayName: 'Restore'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\.pipelines\restore.ps1'
workingDirectory: '$(Build.SourcesDirectory)'
- task: PowerShell@2
displayName: 'Build'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\.pipelines\build.ps1'
workingDirectory: '$(Build.SourcesDirectory)'
- task: onebranch.pipeline.signing@1
displayName: 'Sign binaries'
inputs:
command: 'sign'
signing_environment: 'azure-ado'
signing_profile: 'internal_azure_service'
files_to_sign: 'dist\**\*'
search_root: '$(Build.SourcesDirectory)'
- task: PowerShell@2
displayName: 'Package'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\.pipelines\package.ps1'
workingDirectory: '$(Build.SourcesDirectory)'
- task: NuGetToolInstaller@1
displayName: 'Install Nuget'
inputs:
versionSpec: '*'
checkLatest: true
- task: PowerShell@2
displayName: 'Nuget Package'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\.pipelines\nuget_pack.ps1'
workingDirectory: '$(Build.SourcesDirectory)'
# Copying build artifacts to the Output folder
- task: CopyFiles@2
displayName: 'Copy Dist to Output folder'
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: |
dist\**\*
LICENSE.txt
package.json
README.md
TargetFolder: '$(OUTPUTROOT)\outputs\build\build_artifacts'
# Copying source artifacts to the Output folder
- task: CopyFiles@2
displayName: 'Copy source to Output folder'
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: |
**\*
!.pipelines\**\*
!.vscode\**\*
!demo\**\*
!dist\**\*
!node_modules\**\*
!**\out\**\*
!**\test\**\*.*
!**\*.tgz
!**\**.nupkg
TargetFolder: '$(OUTPUTROOT)\outputs\build\source'
# Copying tgz package to the Output folder.
- task: CopyFiles@2
displayName: 'Copy tgz-package to Output folder'
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: |
*.tgz
TargetFolder: '$(OUTPUTROOT)\outputs\package\tgz-package'
# Copying nuget pack to the Output folder
- task: CopyFiles@2
displayName: 'Copy nuget pack to Output folder'
inputs:
SourceFolder: $(Build.SourcesDirectory)
Contents: |
Microsoft.PowerBI.JavaScript.*.nupkg
TargetFolder: '$(OUTPUTROOT)\outputs\package\Release'
# Signing the files created by the build and packaging script
- task: onebranch.pipeline.signing@1
displayName: 'Sign binaries'
inputs:
command: 'sign'
signing_environment: 'azure-ado'
signing_profile: 'internal_azure_service'
files_to_sign: '**'
search_root: '$(OUTPUTROOT)'