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: [
|
podTemplate(label: label, containers: [
|
||||||
containerTemplate(
|
containerTemplate(
|
||||||
name: 'maven',
|
name: 'maven',
|
||||||
@ -17,6 +18,10 @@ podTemplate(label: label, containers: [
|
|||||||
node(label) {
|
node(label) {
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
GIT_HASH = sh (
|
||||||
|
script: 'git rev-parse --short HEAD',
|
||||||
|
returnStdout: true
|
||||||
|
)
|
||||||
container('maven') {
|
container('maven') {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
sh '''
|
sh '''
|
||||||
@ -30,9 +35,16 @@ podTemplate(label: label, containers: [
|
|||||||
container('kaniko') {
|
container('kaniko') {
|
||||||
stage('Image') {
|
stage('Image') {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
sh '''
|
sh "
|
||||||
/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --insecure --skip-tls-verify --cache=true --destination=docker.home.thejimnicholson.com/servicedemo/test:latest
|
/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