-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
37 lines (31 loc) · 1.01 KB
/
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
#!/usr/bin/env groovy
def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
def home = "/home/jenkins"
def workspace = "${home}/workspace/build-jenkins-operator"
def workdir = "${workspace}/src/github.com/VirtusLab/jenkins-operator/"
podTemplate(label: label,
containers: [
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:alpine'),
containerTemplate(name: 'jdk-8', image: 'openjdk:8-jdk-alpine', ttyEnabled: true),
]) {
node(label) {
// dir(workdir) {
stage('Init') {
timeout(time: 3, unit: 'MINUTES') {
checkout scm
}
}
stage('Build') {
container('jdk-8') {
sh 'apk add --no-cache bash'
sh './gradlew build'
}
}
stage('Test') {
container('jdk-8') {
sh './gradlew test'
}
}
/// }
}
}