diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-04-28 07:21:53 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-04-28 08:42:45 +0200 |
commit | dd722479f60df8ffcf8d337e5e1d7331c41461c6 (patch) | |
tree | 756cfb52b59dbdfa6ebc0d2978bc7d822fae0354 /Jenkinsfile | |
parent | 93cbd35189bd217a6880bf493a4a268afcf81651 (diff) |
KB59 Add Jenkinsfile.
Change-Id: I1329c6ab588d0ceabe42232d3cc08c2799fdc75c
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d11ad69 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,59 @@ +// -*- mode: groovy -*- +pipeline { + + agent { + kubernetes { + cloud 'kubernetes' + label 'mulkcms2-v1' + yaml """ + apiVersion: v1 + kind: Pod + metadata: {} + spec: + containers: + - name: main + image: adoptopenjdk:14-hotspot-bionic + tty: true + command: + - /bin/cat + } + """ + } + } + + stages { + + stage('Build & Test') { + steps { + container('main') { + cache(maxCacheSize: 1000, caches: [ + [$class: 'ArbitraryFileCache', excludes: '', includes: '**/*', path: "$HOME/.m2"], + [$class: 'ArbitraryFileCache', excludes: '', includes: '**/*', path: "$HOME/.yarn-cache"], + ]) { + ansiColor('xterm') { + sh """ + apt-get -y update + apt-get -y install --no-install-recommends npm + npm install -g yarn + yarn config set cache-folder $HOME/.yarn-cache + ./mvnw package -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false + """ + } + } + } + } + } + + stage('Archive artifacts') { + steps { + container('main') { + recordIssues tools: [ + mavenConsole(), + java() + ] + } + } + } + + } +} |