From 1488b1741c0674a8f91fe654f1e939cb596bf3b3 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 11 Jan 2026 05:19:42 +0000 Subject: GitLab CI setup --- .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ REUSE.toml | 7 +++++-- build.sh | 2 +- ci/mvn-settings.xml | 20 ++++++++++++++++++++ 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 ci/mvn-settings.xml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b401a9d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +image: maven:4.0.0-rc-5-eclipse-temurin-25-alpine + +variables: + M2_REPO: ".m2/repository" + MAVEN_OPTS: "-Dmaven.repo.local=$M2_REPO" + +cache: + paths: + - .m2/repository + - target/ + +stages: + - build + - deploy + +build-repro-job: + stage: Build + script: + - ./build.sh + +build-job: + stage: build + script: + - ./mvnw verify -Denv=test + +deploy-job: + stage: deploy + environment: production + script: + - ./mvnw -s ci/mvn-settings.xml deploy diff --git a/REUSE.toml b/REUSE.toml index 57eeea1..5134362 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -9,6 +9,9 @@ SPDX-FileCopyrightText = "Apache Software Foundation" [[annotations]] label = "Miscellaneous little shits I put under CC0" -path = ["build.sh", ".gitattributes", ".gitignore", ".pre-commit-config.yaml", ".sdkmanrc"] +path = [ + "build.sh", "ci/mvn-settings.xml", ".gitattributes", ".gitignore", ".gitlab-ci.yml", ".pre-commit-config.yaml", + ".sdkmanrc", +] SPDX-License-Identifier = "CC0-1.0" -SPDX-FileCopyrightText = " 2025 Uko Kokņevičs " +SPDX-FileCopyrightText = " 2025-2026 Uko Kokņevičs " diff --git a/build.sh b/build.sh index 52ae44a..db17021 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,6 @@ set -eu ./mvnw dependency:go-offline install -rm -fr ~/.m2/repository/lv/enes/ +rm -fr ${M2_REPO:-~/.m2/repository}/lv/enes/ ./mvnw -o clean ./mvnw -o install diff --git a/ci/mvn-settings.xml b/ci/mvn-settings.xml new file mode 100644 index 0000000..933e3ff --- /dev/null +++ b/ci/mvn-settings.xml @@ -0,0 +1,20 @@ + + + + mvn.enes.lv + ${env.MAVEN_REPO_USER} + ${env.MAVEN_REPO_PASS} + + + mvn.enes.lv-snapshots + ${env.MAVEN_REPO_USER} + ${env.MAVEN_REPO_PASS} + + + nvd.nist.gov + ${env.NVD_NIST_API_KEY} + + + -- cgit v1.2.3