diff options
| author | 2026-01-11 05:19:42 +0000 | |
|---|---|---|
| committer | 2026-01-11 08:22:24 +0200 | |
| commit | 1488b1741c0674a8f91fe654f1e939cb596bf3b3 (patch) | |
| tree | f0e78623275c050332c1c0233b494abee8f6f44b | |
| parent | Add org.codehaus.mojo:build-helper-maven-plugin (diff) | |
| download | lv.enes:parent-1488b1741c0674a8f91fe654f1e939cb596bf3b3.tar.gz lv.enes:parent-1488b1741c0674a8f91fe654f1e939cb596bf3b3.tar.xz lv.enes:parent-1488b1741c0674a8f91fe654f1e939cb596bf3b3.zip | |
GitLab CI setup
| -rw-r--r-- | .gitlab-ci.yml | 30 | ||||
| -rw-r--r-- | REUSE.toml | 7 | ||||
| -rwxr-xr-x | build.sh | 2 | ||||
| -rw-r--r-- | ci/mvn-settings.xml | 20 |
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 @@ | |||
| 1 | image: maven:4.0.0-rc-5-eclipse-temurin-25-alpine | ||
| 2 | |||
| 3 | variables: | ||
| 4 | M2_REPO: ".m2/repository" | ||
| 5 | MAVEN_OPTS: "-Dmaven.repo.local=$M2_REPO" | ||
| 6 | |||
| 7 | cache: | ||
| 8 | paths: | ||
| 9 | - .m2/repository | ||
| 10 | - target/ | ||
| 11 | |||
| 12 | stages: | ||
| 13 | - build | ||
| 14 | - deploy | ||
| 15 | |||
| 16 | build-repro-job: | ||
| 17 | stage: Build | ||
| 18 | script: | ||
| 19 | - ./build.sh | ||
| 20 | |||
| 21 | build-job: | ||
| 22 | stage: build | ||
| 23 | script: | ||
| 24 | - ./mvnw verify -Denv=test | ||
| 25 | |||
| 26 | deploy-job: | ||
| 27 | stage: deploy | ||
| 28 | environment: production | ||
| 29 | script: | ||
| 30 | - ./mvnw -s ci/mvn-settings.xml deploy | ||
| @@ -9,6 +9,9 @@ SPDX-FileCopyrightText = "Apache Software Foundation" | |||
| 9 | 9 | ||
| 10 | [[annotations]] | 10 | [[annotations]] |
| 11 | label = "Miscellaneous little shits I put under CC0" | 11 | label = "Miscellaneous little shits I put under CC0" |
| 12 | path = ["build.sh", ".gitattributes", ".gitignore", ".pre-commit-config.yaml", ".sdkmanrc"] | 12 | path = [ |
| 13 | "build.sh", "ci/mvn-settings.xml", ".gitattributes", ".gitignore", ".gitlab-ci.yml", ".pre-commit-config.yaml", | ||
| 14 | ".sdkmanrc", | ||
| 15 | ] | ||
| 13 | SPDX-License-Identifier = "CC0-1.0" | 16 | SPDX-License-Identifier = "CC0-1.0" |
| 14 | SPDX-FileCopyrightText = " 2025 Uko Kokņevičs <perkontevs@gmail.com>" | 17 | SPDX-FileCopyrightText = " 2025-2026 Uko Kokņevičs <perkontevs@gmail.com>" |
| @@ -6,6 +6,6 @@ | |||
| 6 | set -eu | 6 | set -eu |
| 7 | 7 | ||
| 8 | ./mvnw dependency:go-offline install | 8 | ./mvnw dependency:go-offline install |
| 9 | rm -fr ~/.m2/repository/lv/enes/ | 9 | rm -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> | ||