I have to deploy to Apache Archiva with a custom .m2/settings.xml in a Gitlab project. So I am doing the following 3 steps:
1. my .gitlab-ci.yml
stages:
- build
Build:
stage: build
image: maven:latest
script:
- mvn --settings .m2/settings.xml -DskipTests=true clean package
2. my env variables in Gitlab CI/CD Settings:
3. custom .m2/settings.xml in project:
[...]
<server>
<id>archiva.snapshots</id>
<username>${ENV.MAVEN_USER}</username>
<password>${ENV.MAVEN_PASSWORD}</password>
</server>
[...]
1. my .gitlab-ci.yml
stages:
- build
Build:
stage: build
image: maven:latest
script:
- mvn --settings .m2/settings.xml -DskipTests=true clean package
2. my env variables in Gitlab CI/CD Settings:
3. custom .m2/settings.xml in project:
[...]
<server>
<id>archiva.snapshots</id>
<username>${ENV.MAVEN_USER}</username>
<password>${ENV.MAVEN_PASSWORD}</password>
</server>
[...]

Comments