chore: update pipeline to trigger only on PRs to dev branch #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
merge_group: | |
types: [checks_requested] | |
parameters: | |
- name: "debug" | |
displayName: "Debug Variables" | |
type: boolean | |
default: false | |
- name: "poolType" | |
displayName: "Pool Type" | |
type: string | |
default: "windows" | |
values: | |
- "windows" | |
- "linux" | |
variables: | |
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning | |
LinuxContainerImage: "mcr.microsoft.com/onebranch/cbl-mariner/build:2.0" # Docker image which is used to build the project https://aka.ms/obpipelines/containers | |
DEBIAN_FRONTEND: noninteractive | |
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}: | |
sourceBranch: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }} | |
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}: | |
sourceBranch: ${{ replace(variables['System.PullRequest.SourceBranch'], 'refs/heads/', '') }} | |
sourceRepo: "microsoft-authentication-library-for-js" | |
resources: | |
repositories: | |
- repository: templates | |
type: git | |
name: OneBranch.Pipelines/GovernedTemplates | |
ref: refs/heads/main | |
- repository: 1P | |
type: git | |
name: IDDP/msal-javascript-1p | |
ref: master | |
extends: | |
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates | |
parameters: | |
globalSdl: | |
policheck: | |
break: true | |
stages: | |
- stage: e2e_tests | |
displayName: "E2E Tests" | |
variables: | |
Codeql.Enabled: true | |
jobs: | |
- template: .pipelines/templates/e2e-tests.yml@1P | |
parameters: | |
jobName: "msal_browser_1p_3p_e2e_tests" | |
targetLib: "msal-browser-1p" | |
poolType: ${{ parameters.poolType }} | |
stage: "CI" | |
sourceRepo: ${{ variables.sourceRepo }} | |
sourceBranch: ${{ variables.sourceBranch }} | |
workspace: "samples/" | |
samples: | |
- "Broker_WAMTestApp" | |
- "PerformanceTelemetrySample" | |
- "BrokerTestApp-React" | |
- "BrokerSingleFrameTestApp" | |
debug: ${{ parameters.debug }} |