Commit 19f6f7bf authored by Merisier Tac's avatar Merisier Tac
Browse files

Separate build and test stages

parent a441f0af
Pipeline #226149 passed with stage
in 1 minute and 43 seconds
...@@ -4,18 +4,30 @@ stages: ...@@ -4,18 +4,30 @@ stages:
- build - build
- deploy - deploy
build_template: build:
stage: build stage: build
tags: tags:
- ci - ci
script: script:
- cd java - cd java
- mvn package # build all (for other phase such as docker) but skip tests
- mvn -DskipTests=true package
artifacts: artifacts:
paths: paths:
- java/target/*.jar - java/target/*.jar
deploy_template: test:
stage: build
tags:
- ci
script:
- cd java
- mvn verify
artifacts:
paths:
- java/target/*.jar
deploy:
stage: deploy stage: deploy
tags: tags:
- ci - ci
...@@ -24,4 +36,4 @@ deploy_template: ...@@ -24,4 +36,4 @@ deploy_template:
- mvn $MAVEN_CLI_OPTS -DskipTests=true -DnexusReleasesUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -DnexusSnapshotsUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -s ../.gitlab-ci/ci_settings.xml deploy - mvn $MAVEN_CLI_OPTS -DskipTests=true -DnexusReleasesUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -DnexusSnapshotsUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -s ../.gitlab-ci/ci_settings.xml deploy
only: only:
- master - master
- tags - tags
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment