Skip to content
Snippets Groups Projects
Commit 4f5c6070 authored by Lukas Malte Monnerjahn's avatar Lukas Malte Monnerjahn
Browse files

add gitlab pipeline

parent ef5038c3
Branches
Tags
No related merge requests found
image: maven:3.9.9-eclipse-temurin-21-alpine
variables:
MAVEN_DEPLOY_CLI_OPTS: "--no-transfer-progress -DskipTests"
MAVEN_CLI_OPTS: >-
-s .m2/ci_settings.xml --batch-mode
-Dmaven.plugin.validation=brief
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2
services:
- docker:dind
cache:
paths:
- .m2/repository/
- target/
stages:
- build
- test
- publish
build:
stage: build
script:
- mvn clean compile $MAVEN_CLI_OPTS
artifacts:
paths:
- target/*.jar
test:
stage: test
script:
- mvn test $MAVEN_CLI_OPTS
verify:
stage: test
script:
- mvn verify $MAVEN_CLI_OPTS
push-snapshot-image-gitlab:
stage: publish
script:
- mvn deploy -Pgitlab-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
only:
- main
push-snapshot-image-nexus:
stage: publish
script:
- mvn deploy -Pnexus-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
only:
- main
push-release-image-gitlab:
stage: publish
script:
- mvn versions:set -DnewVersion=${CI_COMMIT_TAG}
- mvn deploy -Pgitlab-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
rules:
- if: $CI_COMMIT_TAG
push-release-image-nexus:
stage: publish
script:
- mvn versions:set -DnewVersion=${CI_COMMIT_TAG}
- mvn mvn deploy -Pnexus-deploy $MAVEN_DEPLOY_CLI_OPTS $MAVEN_CLI_OPTS
rules:
- if: $CI_COMMIT_TAG
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment