jenkins pipeline get sonarqube result code example
Example 1: jenkins pipeline for sonarqube
$ docker-compose up -d
Example 2: jenkins pipeline for sonarqube
version: "3.2" services: jenkins: image: jenkinsci/jenkins:lts container_name: jenkins-container restart: always ports: - "8080:8080" - '50000:50000' volumes: - '/var/run/docker.sock:/var/run/docker.sock' - '/data/jenkins/jenkins_home:/var/jenkins_home' environment: - "JENKINS_OPTS=--prefix=/jenkins" gitlab: image: gitlab/gitlab-ce:latest container_name: gitlab-container restart: always environment: - GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alphanumeric-string - GITLAB_HOST=your-host-ip-here - GITLAB_PORT=10080 - GITLAB_SSH_PORT=10022 ports: - "10080:80" - "10022:22" volumes: - '/data/gitlab/config:/etc/gitlab' - '/data/gitlab/logs:/var/log/gitlab' - '/data/gitlab/data:/var/opt/gitlab' sonarqube: image: sonarqube:7.9.2-community container_name: sonar-container restart: always networks: - sonarnet environment: - SONARQUBE_JDBC_USERNAME=sonar - SONARQUBE_JDBC_PASSWORD=your-strong-password-here - SONARQUBE_JDBC_URL=jdbc:postgresql://postgressdb:5432/sonarqube ports: - "9000:9000" - "9092:9092" volumes: - '/data/sonar/sonarqube_conf:/opt/sonarqube/conf' - '/data/sonar/sonarqube_data:/opt/sonarqube/data' - '/data/sonar/sonarqube_extensions:/opt/sonarqube/extensions' - '/data/sonar/sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins' postgressdb: image: postgres:12.1 container_name: postgres-container restart: always networks: - sonarnet environment: - POSTGRES_USER=sonar - POSTGRES_PASSWORD=your-strong-password-here - POSTGRES_DB=sonarqube volumes: - '/data/postgresql/sonarqube_db:/var/lib/postgresql' - '/data/postgresql/postgresql_data:/var/lib/postgresql/data' networks: sonarnet: driver: bridge