How can I analyze a PHP project that doesn’t have a “Build” stage? I have the following pipeline:
trigger:
branches:
include:
- '*'
pool:
vmImage: 'ubuntu-latest'
variables:
# Sonar-related variables
SONARQUBE_ENDPOINT: 'myConnection'
PROJECT_KEY: 'myKey'
PROJECT_NAME: MyProject'
PROJECT_VERSION: '1.0'
steps:
- task: SonarQubePrepare@7
displayName: "Prepare SonarQube analysis"
inputs:
SonarQube: $(SONARQUBE_ENDPOINT)
scannerMode: 'Other'
configMode: 'manual'
# Sonar project information
sonarProjectKey: $(PROJECT_KEY)
sonarProjectName: $(PROJECT_NAME)
sonarProjectVersion: $(PROJECT_VERSION)
extraProperties: |
sonar.sources=src
sonar.language=php
sonar.exclusions=**/*.html,**/*.css,**/*.js
- task: SonarQubeAnalyze@7
displayName: "Run SonarQube Analysis"
- task: SonarQubePublish@7
displayName: "Publish SonarQube Quality Gate Result"
inputs:
pollingTimeoutSec: '600'
and it doesn’t fail but at the same at the “Publish” stage it says that there’s no analysis to publish!
What should I do to get this working?