Skip to content

Commit de321b0

Browse files
committed
build: add gitlab-ci.yml
1 parent fffd92f commit de321b0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.gitlab-ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
stages:
2+
- build
3+
- publish
4+
5+
variables:
6+
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
7+
MAVEN_USER_SETTINGS: "$CI_PROJECT_DIR/maven-settings.xml"
8+
9+
cache:
10+
paths:
11+
- .gradle/caches
12+
- .gradle/caches/**
13+
14+
before_script:
15+
- export GRADLE_USER_HOME=`pwd`/.gradle
16+
- export GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.parallel=false"
17+
- mkdir -p ~/.m2
18+
- echo "$MAVEN_SETTINGS_XML" > ~/.m2/settings.xml
19+
20+
build:
21+
stage: build
22+
image: gradle:latest
23+
script:
24+
- gradle clean shadowJar
25+
- echo "Gefundene Artefakte:"
26+
- find . -type f -path "**/build/libs/*.jar" ! -path "**/.gradle/**" -exec ls -lh {} \;
27+
28+
artifacts:
29+
paths:
30+
- "**/build/libs/*.jar"
31+
exclude:
32+
- .gradle/**
33+
- "**/.gradle/**"
34+
- "./build-logic/**"
35+
36+
publish:
37+
stage: publish
38+
image: gradle:latest
39+
script:
40+
- gradle publish
41+
dependencies:
42+
- build
43+
rules:
44+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

0 commit comments

Comments
 (0)