From 2c892c1f7c148957850afcc82691a215fe858dc2 Mon Sep 17 00:00:00 2001 From: abbenhoumi Date: Sun, 5 Apr 2020 17:54:55 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16896d6..2b1be59 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,13 @@ image: maven:latest stages: - - build - - run - - test + - build + - test + - run +variables: + MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode" + MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" cache: paths: @@ -14,16 +17,15 @@ cache: build: stage: build script: - - mvn compile -run: - stage: run - script: - - mvn package - - mvn exec:java -Dexec.mainClass="isima.f2.RamassagePoubleDepotApplication" + - mvn $MAVEN_CLI_OPTS compile test: stage: test script: - - mvn test - dependencies: - - run + - mvn $MAVEN_CLI_OPTS test + +run: + stage: run + script: + - mvn $MAVEN_CLI_OPTS package + - mvn $MAVEN_CLI_OPTS exec:java -Dexec.mainClass="isima.F2.RamassagePoubleDepotApplicationTests" -- GitLab