blob: d11ad69f08a2a86920f5960a1a4b53fa2feca14b [file] [log] [blame]
Matthias Andreas Benkarddd722472020-04-28 07:21:53 +02001// -*- mode: groovy -*-
2pipeline {
3
4 agent {
5 kubernetes {
6 cloud 'kubernetes'
7 label 'mulkcms2-v1'
8 yaml """
9 apiVersion: v1
10 kind: Pod
11 metadata: {}
12 spec:
13 containers:
14 - name: main
15 image: adoptopenjdk:14-hotspot-bionic
16 tty: true
17 command:
18 - /bin/cat
19 }
20 """
21 }
22 }
23
24 stages {
25
26 stage('Build & Test') {
27 steps {
28 container('main') {
29 cache(maxCacheSize: 1000, caches: [
30 [$class: 'ArbitraryFileCache', excludes: '', includes: '**/*', path: "$HOME/.m2"],
31 [$class: 'ArbitraryFileCache', excludes: '', includes: '**/*', path: "$HOME/.yarn-cache"],
32 ]) {
33 ansiColor('xterm') {
34 sh """
35 apt-get -y update
36 apt-get -y install --no-install-recommends npm
37 npm install -g yarn
38 yarn config set cache-folder $HOME/.yarn-cache
39 ./mvnw package -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false
40 """
41 }
42 }
43 }
44 }
45 }
46
47 stage('Archive artifacts') {
48 steps {
49 container('main') {
50 recordIssues tools: [
51 mavenConsole(),
52 java()
53 ]
54 }
55 }
56 }
57
58 }
59}