Skip to content
Snippets Groups Projects

Ci setup

1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
.gitlab-ci.yml 0 → 100644
+ 81
0
image: frekele/gradle:latest
# Make the gradle wrapper executable. This essentially downloads a copy of
# Gradle to build the project with.
# https://docs.gradle.org/current/userguide/gradle_wrapper.html
# It is expected that any modern gradle project has a wrapper
before_script:
- chmod +x gradlew
# We redirect the gradle user home using -g so that it caches the
# wrapper and dependencies.
# https://docs.gradle.org/current/userguide/gradle_command_line.html
#
# Unfortunately it also caches the build output so
# cleaning removes reminants of any cached builds.
# The assemble task actually builds the project.
# If it fails here, the tests can't run.
stages:
- analyze
- build
- test
sonarqube:
stage: analyze
only:
- master
variables:
GIT_STRATEGY: clone
script:
- ./gradlew sonarqube -Dsonar.projectVersion=$CI_BUILD_REF -x test
sonarqube_manual:
stage: analyze
when: manual
variables:
GIT_STRATEGY: clone
script:
- ./gradlew sonarqube -Dsonar.branch=$CI_BUILD_REF_NAME -Dsonar.projectVersion=$CI_BUILD_REF -Dsonar.profile=ANDI_Simulator -x test
sonarqube_preview:
stage: analyze
variables:
GIT_STRATEGY: clone
script:
- ./gradlew sonarqube -Dsonar.analysis.mode=preview -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.issuesReport.console.enable=true -Dsonar.gitlab.commit_sha=$CI_BUILD_REF -Dsonar.gitlab.ref=$CI_BUILD_REF_NAME -x test
allow_failure: true
build:
stage: build
script:
- ./gradlew -g /cache/.gradle clean assemble copyGui
artifacts:
paths:
- lib/
- target/
- data/
- ee/
- example_settings/
- toolkit/
- wdm_settings/
- one.bat
- one.sh
- LICENSE.txt
- README.md
- README.txt
- default_settings.txt
- CONTRIBUTING.md
- HISTORY.txt
allow_failure: false
# Use the generated build output to run the tests.
test:
stage: test
script:
- ./gradlew -g /cache/.gradle check
artifacts:
when: on_failure
paths:
- build/reports/
\ No newline at end of file
Loading