-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
44 lines (43 loc) · 878 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
pipeline {
agent {
node {
label 'maven'
}
}
stages {
stage('Tests') {
steps {
sh './mvnw clean test'
}
}
stage('Package') {
steps {
sh '''
./mvnw package -DskipTests \
-Dquarkus.package.type=uber-jar
'''
archiveArtifacts 'target/*.jar'
}
}
stage('Build Image') {
environment { QUAY = credentials('danielcaldararu') }
steps {
sh '''
./mvnw quarkus:add-extension \
-Dextensions="kubernetes,container-image-jib"
'''
sh '''
./mvnw package -DskipTests \
-Dquarkus.jib.base-jvm-image=quay.io/redhattraining/do400-java-alpineopenjdk11-jre:latest \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.registry=quay.io \
-Dquarkus.container-image.group=$QUAY_USR \
-Dquarkus.container-image.name=do400-deploying-environments \
-Dquarkus.container-image.username=$QUAY_USR \
-Dquarkus.container-image.password="$QUAY_PSW" \
-Dquarkus.container-image.push=true
'''
}
}
}
}