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

M365 pipeline conversion for this repo #805

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
123 changes: 76 additions & 47 deletions build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

# FluidExamples build for CI and PR

pool:
vmImage: ubuntu-latest

parameters:
- name: angular-demo
type: string
Expand Down Expand Up @@ -49,48 +46,80 @@ pr:
variables:
skipComponentGovernanceDetection: true

steps:
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: "Register"
verbosity: "Verbose"
alertWarningLevel: "High"

- task: UseNode@1
displayName: Use Node 20.x
inputs:
version: 20.x
resources:
repositories:
- repository: m365Pipelines
type: git
name: 1ESPipelineTemplates/M365GPT
ref: refs/tags/release

# Install, build, lint, and test each package
- ${{ each parameter in parameters }}:
- task: Npm@1
displayName: Install - ${{ parameter.Value }}
inputs:
command: "custom"
workingDir: "${{ parameter.Value }}"
customCommand: "ci"
- task: CmdLine@2
displayName: Build - ${{ parameter.Value }}
inputs:
script: "npm run build"
workingDirectory: ${{ parameter.Value }}
- task: CmdLine@2
displayName: Lint - ${{ parameter.Value }}
inputs:
script: "npm run lint"
workingDirectory: ${{ parameter.Value }}
- task: CmdLine@2
displayName: Test - ${{ parameter.Value }}
inputs:
script: "npm run ci:test"
workingDirectory: ${{ parameter.Value }}
- task: PublishTestResults@2
displayName: Publish Test Results - ${{ parameter.Value }}
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "**/*junit-report.xml"
searchFolder: ${{ parameter.Value }}/nyc
mergeTestResults: true
# Note while this runs if anything prior fails, the prior test steps won't
# run after first failure. Could be split into jobs to avoid interference.
condition: succeededOrFailed()
extends:
template: v1/M365.Official.PipelineTemplate.yml@m365Pipelines
parameters:
pool:
name: NewLarge-linux-1ES
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think it needs the large pool

Suggested change
name: NewLarge-linux-1ES
name: Small-1ES

os: linux
sdl:
arrow:
# This is the service connection for the Arrow Service Connection in FluidFramework Azure DevOps organization
# Currently we want to use different names for internal and public builds for Arrow Service Connection
${{ if eq(variables['System.TeamProject'], 'internal') }}:
serviceConnection: Arrow_FluidFramework_internal
${{ else }}:
serviceConnection: Arrow_FluidFramework_public
sourceAnalysisPool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-2022
os: windows
# Skip tagging if Github PR coming from a fork
settings:
skipBuildTagsForGitHubPullRequests: true
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: stage
jobs:
- job: job
steps:
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: "Register"
verbosity: "Verbose"
alertWarningLevel: "High"
- task: UseNode@1
displayName: Use Node 20.x
inputs:
version: 20.x
# Install, build, lint, and test each package
- ${{ each parameter in parameters }}:
- task: Npm@1
displayName: Install - ${{ parameter.Value }}
inputs:
command: "custom"
workingDir: "${{ parameter.Value }}"
customCommand: "ci"
- task: CmdLine@2
displayName: Build - ${{ parameter.Value }}
inputs:
script: "npm run build"
workingDirectory: ${{ parameter.Value }}
- task: CmdLine@2
displayName: Lint - ${{ parameter.Value }}
inputs:
script: "npm run lint"
workingDirectory: ${{ parameter.Value }}
- task: CmdLine@2
displayName: Test - ${{ parameter.Value }}
inputs:
script: "npm run ci:test"
workingDirectory: ${{ parameter.Value }}
- task: PublishTestResults@2
displayName: Publish Test Results - ${{ parameter.Value }}
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "**/*junit-report.xml"
searchFolder: ${{ parameter.Value }}/nyc
mergeTestResults: true
# Note while this runs if anything prior fails, the prior test steps won't
# run after first failure. Could be split into jobs to avoid interference.
condition: succeededOrFailed()