Commit 1da8bf2b authored by femiadeyemi's avatar femiadeyemi
Browse files

deploy the snapshot of the webapp artifact to nexus

Motivation:

Helmholtz marketplace webserver depends on this
repo artifact. Hence each new commit should
generate a snapshot that can be easily use by
the Helmholtz marketplace webserver.

Modification:

- create a settings.xml file which contain
    authentication data
- add a variable for the maven cli option that
    ensure that the artifact is deploy to the
    right server
- deploy the aritifact to nexus

Result:

Each commit and merge request will generate a new
artifact snapshot, which can be use by other repo.

Target: master
parent 99826a4f
Pipeline #42586 failed
......@@ -6,6 +6,7 @@ stages:
- deploy
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
......
......@@ -70,7 +70,11 @@ packaging:
- "target/*.jar"
expire_in: 600 seconds
staging:
deploy:
only:
- master
- merge_requests
stage: deploy
script: mvn $MAVEN_CLI_OPTS deploy
trigger:
project: hifis-technical-platform/helmholtz-marketplace-server
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>hifis.snapshot.repository</id>
<username>${env.NEXUS_REPO_USER}</username>
<password>${env.NEXUS_REPO_PASS}</password>
</server>
</servers>
</settings>
\ No newline at end of file
Supports Markdown
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