43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
stages:
|
|
- analyze
|
|
|
|
inspect java and kotlin codes:
|
|
tags:
|
|
- apk
|
|
- android
|
|
stage: analyze
|
|
script:
|
|
- echo "$CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA $CI_COMMIT_BRANCH $CI_COMMIT_DESCRIPTION $CI_COMMIT_TIMESTAMP"
|
|
- echo "${CI_JOB_STAGE}_reports_${CI_PROJECT_NAME}_${CI_BUILD_REF_NAME}"
|
|
- ./gradlew runCodeInspect
|
|
before_script:
|
|
- source change_java_version
|
|
artifacts:
|
|
name: "${CI_JOB_STAGE}_reports_${CI_PROJECT_NAME}_$CI_COMMIT_REF_SLUG"
|
|
when: always
|
|
expire_in: 1 days
|
|
paths:
|
|
- "build/reports/*"
|
|
only:
|
|
- $CI_COMMIT_BRANCH
|
|
- pushes
|
|
- schedules
|
|
except:
|
|
- master
|
|
allow_failure: true
|
|
|
|
sonarqube-check:
|
|
image: gradle:jre11-slim
|
|
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: gradle sonarqube
|
|
allow_failure: true
|
|
only:
|
|
- merge_requests
|
|
- $CI_COMMIT_BRANCH
|
|
- pushes |