Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pipeline to use template #893

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 0 additions & 57 deletions .azure-devops/build-pipeline.yaml

This file was deleted.

59 changes: 33 additions & 26 deletions .azure-devops/full-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,38 @@
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

jobs:
- job: Windows_10_Latest
resources:
repositories:
- repository: CustomPipelineTemplates
type: git
name: 1ESPipelineTemplates/OfficePipelineTemplates
ref: refs/tags/release
extends:
template: /v1/Office.Unofficial.PipelineTemplate.yml@CustomPipelineTemplates
parameters:
pool:
name: OE-OfficeClientApps
steps:
- template: ./steps/npm-install.yaml
- template: ./steps/build.yaml
- template: ./steps/devcerts.yml
- template: ./steps/edgewebview.yml
- template: ./steps/test.yml

- job: Mac
pool:
name: OPX Mac Dogfood Pool
steps:
- template: ./steps/npm-install.yaml
- template: ./steps/build.yaml
- template: ./steps/test.yml
- template: ./steps/cleanup.yaml

- job: Linux
pool:
name: Azure Pipelines
vmImage: ubuntu-latest
steps:
- template: ./steps/npm-install.yaml
- template: ./steps/build.yaml
- template: ./steps/test.yml
sdl:
eslint:
configuration: required
parser: '@typescript-eslint/parser'
parserOptions: sourceType:module
stages:
- stage: stage
jobs:
- job: Windows_10_Latest
steps:
- template: /.azure-devops/steps/npm-install.yaml@self
- template: /.azure-devops/steps/build.yaml@self
- template: /.azure-devops/steps/devcerts.yml@self
- template: /.azure-devops/steps/edgewebview.yml@self
- template: /.azure-devops/steps/test.yml@self
- job: Linux
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
steps:
- template: /.azure-devops/steps/npm-install.yaml@self
- template: /.azure-devops/steps/build.yaml@self
- template: /.azure-devops/steps/test.yml@self
10 changes: 5 additions & 5 deletions .azure-devops/steps/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- task: Npm@1
displayName: "Build"
inputs:
command: custom
customCommand: "run build"
- task: Npm@1
displayName: "Build"
inputs:
command: custom
customCommand: "run build"
4 changes: 2 additions & 2 deletions .azure-devops/steps/cleanup.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
steps:
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: "Cleanup"
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: "Cleanup"
12 changes: 6 additions & 6 deletions .azure-devops/steps/devcerts.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- script: |
echo Install Office-AddinDev-Certs at machine level
call npm install office-addin-dev-certs
call npx office-addin-dev-certs install --machine
displayName: 'Install add-in dev cert'
- script: |
echo Install Office-AddinDev-Certs at machine level
call npm install office-addin-dev-certs
call npx office-addin-dev-certs install --machine

displayName: 'Install add-in dev cert'
36 changes: 18 additions & 18 deletions .azure-devops/steps/edgewebview.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
steps:
- script: |
echo Enable EdgeWebView Loopback
call npx office-addin-dev-settings appcontainer EdgeWebView --loopback --yes
echo Set Edge WebView Registry Settings
set PATH1="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646"
reg add %PATH1% /f /v DisplayName /t REG_SZ /d "@{Microsoft.Win32WebViewHost_10.0.19041.423_neutral_neutral_cw5n1h2txyewy?ms-resource://Windows.Win32WebViewHost/resources/DisplayName}"
reg add %PATH1% /f /v Moniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"
set PATH2="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646\Children\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646-3829197285-1050560373-949424154-522343454"
reg add %PATH2% /f /v DisplayName /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy/123"
reg add %PATH2% /f /v Moniker /t REG_SZ /d "123"
reg add %PATH2% /f /v ParentMoniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"
displayName: 'Enable Edge WebView'
- script: |
echo Enable EdgeWebView Loopback
call npx office-addin-dev-settings appcontainer EdgeWebView --loopback --yes

echo Set Edge WebView Registry Settings

set PATH1="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646"

reg add %PATH1% /f /v DisplayName /t REG_SZ /d "@{Microsoft.Win32WebViewHost_10.0.19041.423_neutral_neutral_cw5n1h2txyewy?ms-resource://Windows.Win32WebViewHost/resources/DisplayName}"
reg add %PATH1% /f /v Moniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"

set PATH2="HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646\Children\S-1-15-2-1310292540-1029022339-4008023048-2190398717-53961996-4257829345-603366646-3829197285-1050560373-949424154-522343454"

reg add %PATH2% /f /v DisplayName /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy/123"
reg add %PATH2% /f /v Moniker /t REG_SZ /d "123"
reg add %PATH2% /f /v ParentMoniker /t REG_SZ /d "microsoft.win32webviewhost_cw5n1h2txyewy"

displayName: 'Enable Edge WebView'
10 changes: 5 additions & 5 deletions .azure-devops/steps/npm-install.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- task: Npm@1
displayName: "Install NPM packages"
inputs:
command: custom
customCommand: "install"
- task: Npm@1
displayName: "Install NPM packages"
inputs:
command: custom
customCommand: "install"
10 changes: 5 additions & 5 deletions .azure-devops/steps/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:
- task: Npm@1
displayName: "Run tests"
inputs:
command: custom
customCommand: "run test"
- task: Npm@1
displayName: "Run tests"
inputs:
command: custom
customCommand: "run test"
18 changes: 9 additions & 9 deletions .azure-devops/steps/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
steps:
- task: CmdLine@2
inputs:
script: |
echo Running Tests
npm run test
echo Done running tests
displayName: 'Run Tests'
- task: CmdLine@2
inputs:
script: |
echo Running Tests

npm run test

echo Done running tests
displayName: 'Run Tests'
Loading