Skip to content
Snippets Groups Projects
Commit 34caf0f5 authored by Jose Raul Barreras's avatar Jose Raul Barreras
Browse files

add PHP gitlab-ci examples

parent 38094627
Branches
No related tags found
2 merge requests!15Merge Develop into Master,!14Remove the non UNL registry
# PHP examples of .gitlab-ci.yml
## Standard PHP app with lint and SonarQube analysis
```
# 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
variables:
GITLAB_CI: 1
stages:
- test
PHP Lint:
stage: test
image: its-registry.unl.edu/unl-its/docker-ci/php-lint:7.0
tags:
- docker
script:
- php-lint -d ./
SonarQube:
stage: test
image: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:php
tags:
- docker
only:
- develop
script:
- sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment