feat: Configuration SonarQube et installations CI
This commit is contained in:
@@ -34,6 +34,7 @@ install_dependencies:
|
||||
stage: install
|
||||
script:
|
||||
- echo "Starting installation stage..."
|
||||
- curl -fsSL https://bun.sh/install | bash
|
||||
- composer install # Ajout de la commande composer install
|
||||
- bun install # Ajout de la commande bun install
|
||||
- echo "Dependencies installed successfully."
|
||||
@@ -51,15 +52,27 @@ build_application:
|
||||
stage: build
|
||||
script:
|
||||
- echo "Starting build stage..."
|
||||
- curl -fsSL https://bun.sh/install | bash
|
||||
- echo "Application built successfully."
|
||||
needs:
|
||||
- run_tests #
|
||||
|
||||
analyse_code:
|
||||
stage: analyse
|
||||
image:
|
||||
name: sonarsource/sonar-scanner-cli:latest
|
||||
entrypoint: [ "" ]
|
||||
variables:
|
||||
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
|
||||
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
|
||||
cache:
|
||||
key: "${CI_JOB_NAME}"
|
||||
paths:
|
||||
- .sonar/cache
|
||||
allow_failure: true
|
||||
script:
|
||||
- echo "Starting analysis stage..."
|
||||
- echo "Running SonarQube analysis..."
|
||||
- sonar-scanner
|
||||
- echo "Code analysis completed."
|
||||
needs:
|
||||
- build_application # Ce job dépend du job 'build_application'
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
sonar.projectKey=mainframe_mainframe_AZgSDOOmCw8KjT0jogWd
|
||||
sonar.projectName=Mainframe Esy-Web
|
||||
sonar.projectVersion=1.0
|
||||
sonar.php.coverage.reportPaths=.coverage/clover.xml
|
||||
sonar.qualitygate.wait=true
|
||||
|
||||
Reference in New Issue
Block a user