Skip to content
Snippets Groups Projects
.gitlab-ci.yml 601 B
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"
Ján Macháček's avatar
Ján Macháček committed
    - ls
    - ./mvnw clean install -Dmaven.test.skip=true $MAVEN_CLI_OPTS

test:
  tags:
    - shared-fi
  stage: test
  script:
    - echo "We are testing your project build, $GITLAB_USER_LOGIN"
    - ./mvnw test $MAVEN_CLI_OPTS