Skip to content
Snippets Groups Projects
Commit bf69ff61 authored by danielspeicher's avatar danielspeicher
Browse files
parent 15ab5552
No related branches found
No related tags found
No related merge requests found
Pipeline #45655 passed
......@@ -15,27 +15,8 @@ To use this image in a **_.gitlab-ci.yml_** file, you can specify a build stage
stages:
- build
build_jar:
stage: build
image: registry.lakedrops.com/docker/maven-build/maven
script:
- mvn clean verify
artifacts:
name: your_artifact_name
paths:
- your_artifact_path
```
stages:
- build
- deploy
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
GIT_SUBMODULE_STRATEGY: recursive
JAR_FILE: datacore-real-estate-3.0.0.jar
cache:
paths:
......@@ -45,10 +26,16 @@ build_jar:
stage: build
image: registry.lakedrops.com/docker/maven-build/maven
script:
- mvn clean deploy -s ci_settings.xml
artifacts:
name: datacore
paths:
- real-estate/target/${JAR_FILE}
- mvn clean verify -s ci_settings.xml
artifacts:
name: your_artifact_name
paths:
- your_artifact_path
```
In the `script` section you can execute any Maven build step. The `-s ci_settings.xml` option is a proper way to
pass a suitable settings file, which is committed in VCS.
The variable `MAVEN_OPTS` should also be set. Here you can specify the local repository the Maven build
process should use. This directory is also cached, so we avoid to downloading the third party modules
when not necessary.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment