-
Notifications
You must be signed in to change notification settings - Fork 18
/
Jenkinsfile
40 lines (35 loc) · 929 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
/*
This jenkins pipeline should be configured as Multibranch Pipeline job in Jenkins
Required Jenkins Plugins:
* All basic Jenkins Pipeline Plugins
* Git plugin
* Docker Pipeline Plugin
* Amazon ECR plugin (if push to ECR)
* Lockable Resources Plugin
*/
pipeline {
agent {
label "${params.AGENT_LABEL ?: 'build'}"
}
parameters {
string(name: 'AGENT_LABEL', defaultValue: 'build')
booleanParam(name: 'BINTRAY_PUBLISH', defaultValue: false)
string(name: 'BINTRAY_CERDENTIAL_ID', defaultValue: 'visenze-jfrog-bintray',
description: 'The jenkins credential ID to push to bintray')
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
script {
sh("sudo update-alternatives --set java /usr/lib/jvm/java-8-oracle/jre/bin/java")
sh("java -version")
}
}
}
}
}