I am trying to build and deploy a simple maven application using GitLab CI. When I try to run the pipeline, I get the following error:
ERROR: Job failed: build directory needs to be an absolute path
Please find below my .gitlab-ci.yml file
image: maven:latest
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
paths:
- .m2/repository/
- target/
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS compile
test:
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
deploy:
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS deploy
only:
- master
Thanks in advance for your solutions.