Files
generations/.gitlab-ci.yml
T
2022-05-01 13:35:19 +00:00

56 lines
1.1 KiB
YAML

before_script:
- source "/home/gitlab-runner/.sdkman/bin/sdkman-init.sh"
- sdk u java 11.0.12-open
stages:
- build
- test
- analysis
- publish
Build Application:
stage: build
script: ./gradlew --build-cache build
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
Create Documentation:
stage: build
script: ./gradlew asciidoctorPdf
Test Application:
stage: test
script: ./gradlew check
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
sonarqube-check:
stage: analysis
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: ./gradlew sonarqube
allow_failure: true
Publish Artifacts:
stage: publish
script: ./gradlew publish
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle