mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-08-03 12:06:08 -04:00
86 lines
1.5 KiB
YAML
86 lines
1.5 KiB
YAML
image: azul/zulu-openjdk-alpine:11-latest
|
|
|
|
variables:
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH/$CI_COMMIT_SHA
|
|
|
|
before_script:
|
|
- export GRADLE_USER_HOME=`pwd`/.gradle_home
|
|
|
|
stages:
|
|
- create
|
|
- build
|
|
- test
|
|
- package
|
|
- publish
|
|
|
|
|
|
cache:
|
|
- key: "$CI_COMMIT_SHA"
|
|
paths:
|
|
- build
|
|
- .gradle
|
|
- key:
|
|
files:
|
|
- "build.gradle.kts"
|
|
- "gradle.properties"
|
|
paths:
|
|
- $GRADLE_USER_HOME/caches
|
|
- key:
|
|
files:
|
|
- "gradle/wrapper/gradle-wrapper.properties"
|
|
paths:
|
|
- $GRADLE_USER_HOME/wrapper
|
|
- key:
|
|
"minosoft-assets"
|
|
paths:
|
|
- ./it
|
|
|
|
create:
|
|
stage: create
|
|
image: alpine:latest
|
|
script:
|
|
- apk add git curl
|
|
- ./release/create.sh
|
|
only:
|
|
- master
|
|
|
|
build:
|
|
stage: build
|
|
script: ./gradlew --build-cache assemble -Pminosoft.updates=true
|
|
only:
|
|
- master
|
|
- merge_requests
|
|
|
|
test:
|
|
stage: test
|
|
script: ./gradlew check -Pminosoft.updates=true
|
|
only:
|
|
- master
|
|
- merge_requests
|
|
artifacts:
|
|
when: always
|
|
reports:
|
|
junit: build/test-results/**/TEST-*.xml
|
|
|
|
# TODO: upload release in the publish step?
|
|
package:
|
|
stage: package
|
|
script:
|
|
- ./gradlew fatJar upload --stacktrace -Pminosoft.updates=true
|
|
only:
|
|
- master
|
|
artifacts:
|
|
paths:
|
|
- build/libs/minosoft-fat-*.jar
|
|
expire_in: 1 days
|
|
|
|
publish:
|
|
stage: publish
|
|
image: alpine:latest
|
|
script:
|
|
- apk add git curl
|
|
- ./release/release.sh
|
|
only:
|
|
- master
|