Work on fixing versioning
Some checks failed
Homelab/java-spring-microservice/pipeline/head There was a failure building this commit
Some checks failed
Homelab/java-spring-microservice/pipeline/head There was a failure building this commit
This commit is contained in:
parent
544411b035
commit
7dffa57882
8
.mvn/extensions.xml
Normal file
8
.mvn/extensions.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
|
||||
<extension>
|
||||
<groupId>fr.brouillard.oss</groupId>
|
||||
<artifactId>jgitver-maven-plugin</artifactId>
|
||||
<version>1.9.0</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
@ -1,5 +1,6 @@
|
||||
|
||||
def label = "mypod-${UUID.randomUUID().toString()}"
|
||||
def label = "servicedemo-${UUID.randomUUID().toString()}"
|
||||
|
||||
podTemplate(label: label, containers: [
|
||||
containerTemplate(
|
||||
name: 'maven',
|
||||
@ -17,6 +18,10 @@ podTemplate(label: label, containers: [
|
||||
node(label) {
|
||||
stage('Checkout') {
|
||||
checkout scm
|
||||
GIT_HASH = sh (
|
||||
script: 'git rev-parse --short HEAD',
|
||||
returnStdout: true
|
||||
)
|
||||
container('maven') {
|
||||
stage('Build') {
|
||||
sh '''
|
||||
@ -30,9 +35,16 @@ podTemplate(label: label, containers: [
|
||||
container('kaniko') {
|
||||
stage('Image') {
|
||||
ansiColor('xterm') {
|
||||
sh '''
|
||||
/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --insecure --skip-tls-verify --cache=true --destination=docker.home.thejimnicholson.com/servicedemo/test:latest
|
||||
'''
|
||||
sh "
|
||||
/kaniko/executor \
|
||||
-f `pwd`/Dockerfile \
|
||||
-c `pwd` \
|
||||
--insecure \
|
||||
--skip-tls-verify \
|
||||
--cache=true \
|
||||
--destination=docker.home.thejimnicholson.com/servicedemo/servicedemo:${GIT_HASH} \
|
||||
--destination=docker.home.thejimnicholson.com/servicedemo/servicedemo:latest
|
||||
"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user