Commit dcf4b5dc authored by Nicolo Parmiggiani's avatar Nicolo Parmiggiani
Browse files

Update .gitlab-ci.yml

parent b72a2191
Loading
Loading
Loading
Loading
Loading
+38 −30
Original line number Diff line number Diff line
@@ -4,43 +4,51 @@ image:
  


sonarqube-check:
  image: 
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: [""]
  variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  script: 
    - sonar-scanner
  allow_failure: true
  only:
    - master # or the name of your main branch
#sonarqube-check:
#  image: 
#    name: sonarsource/sonar-scanner-cli:latest
#    entrypoint: [""]
#  variables:
#    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
#    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
#  cache:
#    key: "${CI_JOB_NAME}"
#    paths:
#      - .sonar/cache
#  script: 
#    - sonar-scanner
#  allow_failure: true
#  only:
#    - master # or the name of your main branch



#code_quality:
#  services:            # Shut off Docker-in-Docker
#  tags:
#    - cq-astri     # Set this job to only run on our new specialized runner
code_quality:
  services:            # Shut off Docker-in-Docker
  tags:
    - cq-astri     # Set this job to only run on our new specialized runner

  #variables:
    #CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.18"
  variables:
    CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.18"

#  artifacts:
#    paths: [gl-code-quality-report.json]
  artifacts:
    paths: [gl-code-quality-report.json]

#code_quality_html:
#  extends: code_quality
#  variables:
#    REPORT_FORMAT: html
#  artifacts:
#    paths: [gl-code-quality-report.html]
code_quality_html:
  extends: code_quality
  variables:
    REPORT_FORMAT: html
  artifacts:
    paths: [gl-code-quality-report.html]

pages:
  stage: deploy
  script:
    - mkdir -p public/jobs/${CI_JOB_ID}/artifacts
    - cp gl-code-quality-report.html public/jobs/${CI_JOB_ID}/artifacts
  artifacts:
    paths:
      - public
  
  
secondpipe: