summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2026-01-11 05:19:42 +0000
committerGravatar Uko Kokņevičs2026-01-11 08:22:24 +0200
commit1488b1741c0674a8f91fe654f1e939cb596bf3b3 (patch)
treef0e78623275c050332c1c0233b494abee8f6f44b
parentAdd org.codehaus.mojo:build-helper-maven-plugin (diff)
downloadlv.enes:parent-1488b1741c0674a8f91fe654f1e939cb596bf3b3.tar.gz
lv.enes:parent-1488b1741c0674a8f91fe654f1e939cb596bf3b3.tar.xz
lv.enes:parent-1488b1741c0674a8f91fe654f1e939cb596bf3b3.zip
GitLab CI setup
-rw-r--r--.gitlab-ci.yml30
-rw-r--r--REUSE.toml7
-rwxr-xr-xbuild.sh2
-rw-r--r--ci/mvn-settings.xml20
4 files changed, 56 insertions, 3 deletions
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 @@
1image: maven:4.0.0-rc-5-eclipse-temurin-25-alpine
2
3variables:
4 M2_REPO: ".m2/repository"
5 MAVEN_OPTS: "-Dmaven.repo.local=$M2_REPO"
6
7cache:
8 paths:
9 - .m2/repository
10 - target/
11
12stages:
13 - build
14 - deploy
15
16build-repro-job:
17 stage: Build
18 script:
19 - ./build.sh
20
21build-job:
22 stage: build
23 script:
24 - ./mvnw verify -Denv=test
25
26deploy-job:
27 stage: deploy
28 environment: production
29 script:
30 - ./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"
9 9
10[[annotations]] 10[[annotations]]
11label = "Miscellaneous little shits I put under CC0" 11label = "Miscellaneous little shits I put under CC0"
12path = ["build.sh", ".gitattributes", ".gitignore", ".pre-commit-config.yaml", ".sdkmanrc"] 12path = [
13 "build.sh", "ci/mvn-settings.xml", ".gitattributes", ".gitignore", ".gitlab-ci.yml", ".pre-commit-config.yaml",
14 ".sdkmanrc",
15]
13SPDX-License-Identifier = "CC0-1.0" 16SPDX-License-Identifier = "CC0-1.0"
14SPDX-FileCopyrightText = " 2025 Uko Kokņevičs <perkontevs@gmail.com>" 17SPDX-FileCopyrightText = " 2025-2026 Uko Kokņevičs <perkontevs@gmail.com>"
diff --git a/build.sh b/build.sh
index 52ae44a..db17021 100755
--- a/build.sh
+++ b/build.sh
@@ -6,6 +6,6 @@
6set -eu 6set -eu
7 7
8./mvnw dependency:go-offline install 8./mvnw dependency:go-offline install
9rm -fr ~/.m2/repository/lv/enes/ 9rm -fr ${M2_REPO:-~/.m2/repository}/lv/enes/
10./mvnw -o clean 10./mvnw -o clean
11./mvnw -o install 11./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 @@
1<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
4 <servers>
5 <server>
6 <id>mvn.enes.lv</id>
7 <username>${env.MAVEN_REPO_USER}</username>
8 <password>${env.MAVEN_REPO_PASS}</password>
9 </server>
10 <server>
11 <id>mvn.enes.lv-snapshots</id>
12 <username>${env.MAVEN_REPO_USER}</username>
13 <password>${env.MAVEN_REPO_PASS}</password>
14 </server>
15 <server>
16 <id>nvd.nist.gov</id>
17 <password>${env.NVD_NIST_API_KEY}</password>
18 </server>
19 </servers>
20</settings>