provs/.gitlab-ci.yml

52 lines
941 B
YAML
Raw Permalink Normal View History

2021-02-10 19:24:43 +00:00
image: openjdk:15-jdk-slim
stages:
- build
- test
- jar
- publish
before_script:
- echo "---------- Start CI ----------"
- export GRADLE_USER_HOME=`pwd`/.gradle
- export repoUser="$repoUser"
- export repoPassword="$repoPassword"
- chmod +x gradlew
build:
stage: build
script:
- echo "---------- build stage ----------"
- ./gradlew --build-cache assemble
artifacts:
paths:
- build/libs/*.jar
expire_in: 1 week
test:
stage: test
services:
- docker:dind
dependencies:
- build
script:
- ./gradlew test
jar:
stage: jar
script:
- echo "---------- jar ----------"
- ./gradlew jar
artifacts:
paths:
- build/libs/*.jar
expire_in: 2 months
publish:
stage: publish
script:
- echo "---------- publish ----------"
- ./gradlew -PrepoUser="$repoUser" -PrepoPassword="$repoPassword" publish
after_script:
- echo "---------- End CI ----------"