Created
March 9, 2020 14:39
-
-
Save xb4dc0d3/3150a7a0f75c7559f9abe1439c877748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
sonarqube: | |
image: nuga99/sonar-scanner-python | |
stage: sonarqube | |
before_script: | |
- python3 -V | |
- pip3 install -r requirements.txt | |
script: | |
- if [[ $CI_COMMIT_REF_NAME == staging ]]; then ENVIRON="sip.settings.staging"; else ENVIRON="sip.settings.dev"; fi | |
- coverage run --omit='manage.py,*/venv/*,**/python3.6/**,authentication/cas_wrapper.py,/usr/**' manage.py test --settings=${ENVIRON} | |
- coverage report -m | |
- coverage xml -i | |
- sonar-scanner | |
-Dsonar.host.url=https://pmpl.cs.ui.ac.id/sonarqube | |
-Dsonar.projectKey=$SONARQUBE_PROJECT_KEY | |
-Dsonar.login=$SONARQUBE_TOKEN | |
-Dsonar.branch.name=$CI_COMMIT_REF_NAME | |
only: | |
- master | |
- staging | |
- development | |
- /^.*PBI-.*$/ | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment