giovedì 28 maggio 2020

HowTo: custom settings.xml with secrets in CI/CD

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>

[...]

Nessun commento:

How to deploy Podman images to OpenShift Container Platform (CRC on localhost)

I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost.       1. Get the...