Commit 01d54f92 authored by Jeff Sturek's avatar Jeff Sturek
Browse files

Update .gitlab-ci.yml file with Dependency checks and SonarQube.

parent e9c02342
Pipeline #44156 passed with stage
in 3 seconds
# To use this script, you must have the following variables defined
# You can define them at the project or the group level
#
# SONAR_URL: Full URL to the SonarQube server
# SONAR_TOKEN: API token for SonarQube
stages:
- Test
- Security
- QA
PHP Lint:
stage: Test
image: its-registry.unl.edu/unl-its/docker-ci/php-lint:7.3
tags:
- docker
script:
- php-lint -d . -e .php -e .phtml
Dependency Check:
stage: Security
image: its-registry.unl.edu/unl-its/docker-ci/dependency-check
tags:
- docker
only:
- develop
cache:
policy: push
paths:
- dep_check
script:
- dependency-check -noupdate -f JSON -f XML -f HTML -s . -o ./dep_check --project "$CI_PROJECT_TITLE" --enableExperimental
SonarQube:
stage: QA
image: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:php
tags:
- docker
only:
- develop
cache:
policy: pull
paths:
- dep_check
script:
- sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_TOKEN
-Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.projectName="$CI_PROJECT_TITLE"
-Dsonar.sources=.
-Dsonar.dependencyCheck.reportPath=./dep_check/dependency-check-report.xml
-Dsonar.dependencyCheck.jsonReportPath=./dep_check/dependency-check-report.json
-Dsonar.dependencyCheck.htmlReportPath=./dep_check/dependency-check-report.html
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment