Skip to content

Commit

Permalink
Merge pull request #59 from lykabernardo/master
Browse files Browse the repository at this point in the history
Adding necessary plugins and config for pluggable scm jenkinsfile
  • Loading branch information
dsingh07 authored Jul 5, 2018
2 parents d35414c + ba57062 commit f02c405
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
14 changes: 1 addition & 13 deletions resources/init.groovy.d/adop_sonar.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import hudson.model.*
import jenkins.model.*
import hudson.plugins.sonar.*
import hudson.plugins.sonar.model.TriggersConfig
import hudson.plugins.sonar.utils.SQServerVersions
import hudson.tools.*

// Check if enabled
Expand All @@ -14,11 +13,6 @@ if (!env['ADOP_SONAR_ENABLED'].toBoolean()) {

// Variables
def sonar_server_url = env['SONAR_SERVER_URL']
def sonar_account_login = env['SONAR_ACCOUNT_LOGIN']
def sonar_account_password = env['SONAR_ACCOUNT_PASSWORD']
def sonar_db_url = env['SONAR_DB_URL']
def sonar_db_login = env['SONAR_DB_LOGIN']
def sonar_db_password = env['SONAR_DB_PASSWORD']
def sonar_plugin_version = env['SONAR_PLUGIN_VERSION']
def sonar_additional_props = env['SONAR_ADDITIONAL_PROPS']

Expand All @@ -38,16 +32,10 @@ Thread.start {
def sonar_inst = new SonarInstallation(
"ADOP Sonar", // Name
sonar_server_url,
SQServerVersions.SQ_5_1_OR_LOWER, // Major version upgrade of server would require to change it
"", // Token
sonar_db_url,
sonar_db_login,
sonar_db_password,
sonar_plugin_version,
sonar_additional_props,
new TriggersConfig(),
sonar_account_login,
sonar_account_password,
"" // Additional Analysis Properties
)

Expand Down Expand Up @@ -75,7 +63,7 @@ Thread.start {

def sonarRunnerInstaller = new SonarRunnerInstaller(sonar_runner_version)
def installSourceProperty = new InstallSourceProperty([sonarRunnerInstaller])
def sonarRunner_inst = new SonarRunnerInstallation("ADOP SonarRunner " + sonar_runner_version, "", [installSourceProperty])
def sonarRunner_inst = new SonarRunnerInstallation("ADOP SonarScanner", "", [installSourceProperty])

// Only add our Sonar Runner if it does not exist - do not overwrite existing config
def sonar_runner_installations = desc_SonarRunnerInst.getInstallations()
Expand Down
6 changes: 5 additions & 1 deletion resources/plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ copy-to-slave:1.4.4
copyartifact:1.39.1
credentials-binding:1.16
credentials:2.1.16
cucumber:0.0.2
cucumber-reports:3.16.0
cvs:2.14
dashboard-view:2.9.11
Expand Down Expand Up @@ -69,6 +70,7 @@ jquery:1.12.4-0
jsch:0.1.54.2
jslint:0.8.2
junit:1.24
junit-attachments:1.5
ldap:1.20
mailer:1.21
mapdb-api:1.0.9.0
Expand All @@ -90,6 +92,7 @@ pipeline-build-step:2.7
pipeline-github-lib:1.0
pipeline-graph-analysis:1.6
pipeline-input-step:2.8
pipeline-maven:3.5.8
pipeline-milestone-step:1.3.1
pipeline-model-api:1.2.9
pipeline-model-declarative-agent:1.1.1
Expand All @@ -110,14 +113,15 @@ scm-api:2.2.7
script-security:1.44
sectioned-view:1.24
simple-theme-plugin:0.4
sonar:2.4.4
sonar:2.7.1
ssh-agent:1.15
ssh-credentials:1.13
ssh-slaves:1.26
structs:1.14
subversion:2.10.5
swarm:3.12
tap:2.2.1
tasks:4.52
thinBackup:1.9
timestamper:1.8.10
token-macro:2.5
Expand Down

0 comments on commit f02c405

Please sign in to comment.