1
0

10 Commits

12 changed files with 28 additions and 25 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

29
build/Jenkinsfile vendored
View File

@@ -61,21 +61,24 @@ pipeline {
stage('Docker Build & Push') {
steps {
script {
sh "pwd"
sh "ls -R"
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()
withEnv(['DOCKER_BUILDKIT=0']) {
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} .")
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("latest")
if (params.DRY_RUN) {
echo "DRY_RUN - do not push image to registry"
}
else {
customImage.push("${releaseVer}")
customImage.push("latest")
}
}
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<artifactId>nbs-cloud-aggregator</artifactId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<artifactId>nbs-cloud-aggregator</artifactId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

View File

@@ -10,7 +10,7 @@
<groupId>de.77zzcx7.nbs-cloud</groupId>
<artifactId>nbs-cloud-aggregator</artifactId>
<version>27-SNAPSHOT</version>
<version>29</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>v29</tag>
</scm>
<dependencyManagement>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<artifactId>web-container-config</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>nbs-cloud-aggregator</artifactId>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<artifactId>web-container-registry</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>
<artifactId>nbs-cloud-aggregator</artifactId>
<version>27-SNAPSHOT</version>
<version>29</version>
</parent>
<groupId>de.77zzcx7.nbs-cloud</groupId>