Newer
Older
image: 'maven:3.8.5-openjdk-17-slim'
cache:
paths:
- .m2/repository
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
stages:
- build
- test
build:
tags:
- shared-fi
stage: build
script:
- echo "We are building your project, $GITLAB_USER_LOGIN"
- ./mvn clean install -Dmaven.test.skip=true $MAVEN_CLI_OPTS
artifacts:
expire_in: 10 min
paths:
- "*/target/*.jar"
test:
tags:
- shared-fi
stage: test
script:
- echo "We are testing your project build, $GITLAB_USER_LOGIN"
artifacts:
expire_in: 10 min
paths:
- "*/target/*.jar"