# -------------------------------------------------------------------------------------
#
# Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com). All Rights Reserved.
#
# This software is the property of WSO2 LLC. and its suppliers, if any.
# Dissemination of any information or reproduction of any material contained
# herein in any form is strictly forbidden, unless permitted by WSO2 expressly.
# You may not alter or remove any copyright or other notice from copies of this content.
#
# --------------------------------------------------------------------------------------

schedules:
- cron: "0 0 * * *"
  displayName: Daily midnight SCA build
  branches:
    include:
    - master

trigger:
  - none

pr:
  branches:
    include:
    - master

variables:
- group: asgardeo-common-secrets

pool: 'asgardeo-shared-scale-set-agents'

resources:
  repositories:
    - repository: templates
      type: github
      name: wso2-enterprise/azure-pipeline-templates
      ref: refs/heads/dev
      endpoint: asgardeo-github-sca-scan

jobs:
  - job: sca_scan
    displayName: SCA scan
    steps:
      - template: ci-pipelines/templates/sca-scan-java.yaml@templates
        parameters:
          MAVEN_ROOT: ''
          API_KEY: $(FOSSA-API-KEY)
