Last active
October 14, 2016 23:31
-
-
Save kako-nawao/979ddc1964294897fe55 to your computer and use it in GitHub Desktop.
SaltStack states for SonarQube scanner
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 continuous inspection scanner | |
include: | |
- core.unzip | |
sonar-scanner-download: | |
cmd.run: | |
- name: curl -L https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.5.zip -o {{ pillar['auth']['home'] }}/sonar-scanner-2.5.zip | |
- creates: {{ pillar['auth']['home'] }}/sonar-scanner-2.5.zip | |
sonar-scanner-install: | |
archive.extracted: | |
- name: /opt/ | |
- source: {{ pillar['auth']['home'] }}/sonar-scanner-2.5.zip | |
- archive_format: zip | |
- if_missing: /opt/sonar-scanner-2.5 | |
- user: root | |
- require: | |
- cmd: sonar-scanner-download | |
- pkg: unzip | |
sonar-scanner-config: | |
file.managed: | |
- name: /opt/sonar-scanner-2.5/conf/sonar-runner.properties | |
- source: salt://services/sonarqube/scanner/sonar-runner.properties | |
- template: jinja | |
- require: | |
- archive: sonar-scanner-install | |
sonar-scanner-bin: | |
file.symlink: | |
- name: /usr/local/bin/sonar-scanner | |
- target: /opt/sonar-scanner-2.5/bin/sonar-runner | |
- user: root | |
- require: | |
- archive: sonar-scanner-install |
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
#Configure here general information about the environment, such as SonarQube DB details for example | |
#No information about specific project should appear here | |
#----- Default SonarQube server | |
sonar.host.url=http://{{ pillar['sonar']['host'] }}:9000 | |
#----- Default source code encoding | |
#sonar.sourceEncoding=UTF-8 | |
#----- Global database settings (not used for SonarQube 5.2+) | |
#sonar.jdbc.username=sonar | |
#sonar.jdbc.password=sonar | |
#----- PostgreSQL | |
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar | |
#----- MySQL | |
#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 | |
#----- Oracle | |
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE | |
#----- Microsoft SQLServer | |
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment