简体   繁体   English

Jenkins docker中的声纳运行器配置

[英]sonar-runner configuration in Jenkins docker

Using Docker-compose, created jenkins container and sonarQube container. 使用Docker-compose,创建了jenkins容器和sonarQube容器。

Docker-compose.yml: 码头工人,compose.yml:

jenkins:
  build: .
  ports:
   - "8080:8080"
  links:
   - sonarqube
postgresql:
  image: orchardup/postgresql:latest
  environment:
    - POSTGRESQL_USER=sonar
    - POSTGRESQL_PASS=xaexohquaetiesoo
    - POSTGRESQL_DB=sonar
sonarqube:
  image: harbur/sonarqube:5.0
  links:
    - postgresql:db
  environment:
    - DB_USER=sonar
    - DB_PASS=xaexohquaetiesoo
    - DB_NAME=sonar
    - VIRTUAL_HOST
    - VIRTUAL_PORT=9000
  ports:
    - "9000:9000"
    - "443:443"

Both the Container is up and running. 容器都已启动并正在运行。 Now i need to configure sonar runner in Jenkins Container. 现在,我需要在Jenkins Container中配置声纳运行器。

My Question :is sonar runnner,sonar also installed inside the sonarqube container and how to configure in Jenkins? 我的问题:声纳还安装在声纳容器内,如何在詹金斯中进行配置?

It can be done. 可以办到。 Manage jenkins->SonarQube Scanner installations->Add installer-> sonarqube runner jenkins configuration select required version of sonarqube runner. 管理jenkins-> SonarQube扫描仪安装->添加安装程序-> sonarqube Runner jenkins配置选择所需的sonarqube Runner版本。 and follow the configurations. 并按照配置进行操作。

When you use "build inside docker container", It will install sonar-runner with given version in jenkins global configurations.the sonar-runner.properties file used for the analysis will be same as that of sonarqube server configurations in Jenkins. 当您使用“在docker容器内部构建”时,它将在jenkins全局配置中安装具有给定版本的sonar-runner。用于分析的sonar-runner.properties文件将与Jenkins中的sonarqube服务器配置相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM