Compare commits
23 Commits
7b707e5bb5
...
v31
| Author | SHA1 | Date | |
|---|---|---|---|
|
670d9f19a7
|
|||
|
fefa5a630b
|
|||
|
3d69c88c26
|
|||
|
8b039440d3
|
|||
|
57609bb1f6
|
|||
|
2f19f28213
|
|||
|
6e1eceba2f
|
|||
|
618479634f
|
|||
|
0ec5d71bcb
|
|||
|
b3b15cedc2
|
|||
|
79c59af0c6
|
|||
|
3fe79f6c05
|
|||
|
09b776c920
|
|||
|
bfee9ac082
|
|||
|
e6e312ca09
|
|||
|
30843a3064
|
|||
|
f5e9e26dbf
|
|||
|
4a1e0b9606
|
|||
|
68cc0df881
|
|||
|
b1326d7c37
|
|||
|
9b94766494
|
|||
|
27db87792d
|
|||
|
0af399275d
|
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
FROM eclipse-temurin:25-jre-alpine
|
||||
|
||||
# Create a non-root user for security
|
||||
RUN addgroup -S spring && adduser -S spring -G spring
|
||||
USER spring:spring
|
||||
|
||||
ARG JAR_FILE
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
38
build/Jenkinsfile
vendored
38
build/Jenkinsfile
vendored
@@ -29,6 +29,7 @@ pipeline {
|
||||
git config commit.gpgsign true
|
||||
git config tag.gpgSign true
|
||||
|
||||
# We need to pass the repo url in -Darguments again because of insane maven lifecycle forking
|
||||
pkgx mvn release:prepare -B \
|
||||
-s build/settings.xml \
|
||||
-Dpassword="${GITEA_CREDS_PSW}" \
|
||||
@@ -52,7 +53,7 @@ pipeline {
|
||||
-s build/settings.xml \
|
||||
-DdryRun=${DRY_RUN} \
|
||||
-Drepository.url=${REPO_URL} \
|
||||
-Darguments="-DskipTests"
|
||||
-Darguments="-Drepository.url=${REPO_URL} -DskipTests"
|
||||
'''
|
||||
}
|
||||
}
|
||||
@@ -60,23 +61,26 @@ pipeline {
|
||||
|
||||
stage('Docker Build & Push') {
|
||||
steps {
|
||||
script {
|
||||
sh "pwd"
|
||||
sh "ls -R"
|
||||
def jarPath = sh(script: "ls web-container/target/checkout/target/*.jar | head -n 1", returnStdout: true).trim()
|
||||
def releaseVer = sh(script: "pkgx mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f web-container/target/checkout/pom.xml", returnStdout: true).trim()
|
||||
withEnv(['DOCKER_BUILDKIT=0', 'DOCKER_DRIVER=vfs']) {
|
||||
script {
|
||||
def jarPath = sh(script: "ls target/checkout/web-container/target/*.jar | head -n 1", returnStdout: true).trim()
|
||||
def releaseVer = sh(script: "pkgx mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f target/checkout/web-container/pom.xml", returnStdout: true).trim()
|
||||
def registry = env.DOCKER_REGISTRY.toLowerCase()
|
||||
def registryHost = registry.replace("https://", "").replace("http://", "").replaceAll("/\$", "").toLowerCase()
|
||||
def imageTag = "${registryHost}/nbscloud:${releaseVer}".toLowerCase()
|
||||
|
||||
// docker.withRegistry("${env.DOCKER_REGISTRY}", '') {
|
||||
// def customImage = docker.build("${env.DOCKER_REGISTRY}/my-app:${releaseVer}",
|
||||
// "-f build/Dockerfile --build-arg JAR_FILE=${jarPath} .")
|
||||
//
|
||||
// if (params.DRY_RUN) {
|
||||
// echo "DRY_RUN - do not push image to registry"
|
||||
// }
|
||||
// else {
|
||||
// customImage.push("latest")
|
||||
// }
|
||||
// }
|
||||
docker.withRegistry(registry, '') {
|
||||
def customImage = docker.build(imageTag, "-f build/Dockerfile --build-arg JAR_FILE=${jarPath} .")
|
||||
|
||||
if (params.DRY_RUN) {
|
||||
echo "DRY_RUN - do not push image to registry"
|
||||
}
|
||||
else {
|
||||
customImage.push("${releaseVer}")
|
||||
customImage.push("latest")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -10,7 +10,7 @@
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>The umbrella for all No BullShit cloud projects</description>
|
||||
<name>nbs-cloud-aggregator</name>
|
||||
@@ -49,7 +49,7 @@
|
||||
<connection>scm:git:https://gitea.77zzcx7.de/MK13/NoBullShit-cloud.git</connection>
|
||||
<developerConnection>scm:git:https://gitea.77zzcx7.de/MK13/NoBullShit-cloud.git</developerConnection>
|
||||
<url>https://77zzcx7.de/gitea/MK13/NoBullShit-cloud</url>
|
||||
<tag>v22</tag>
|
||||
<tag>v31</tag>
|
||||
</scm>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>web-container-config</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>web-container-registry</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
<artifactId>nbs-cloud-aggregator</artifactId>
|
||||
<version>26-SNAPSHOT</version>
|
||||
<version>31</version>
|
||||
</parent>
|
||||
|
||||
<groupId>de.77zzcx7.nbs-cloud</groupId>
|
||||
|
||||
Reference in New Issue
Block a user