-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathJenkinsfile
100 lines (99 loc) · 3.04 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
def buildNumber = env.BUILD_NUMBER as int
if (buildNumber > 1) milestone(buildNumber - 1)
milestone(buildNumber)
pipeline {
options { buildDiscarder(logRotator(numToKeepStr: '50')) }
environment {
SPRING_ACTIVE_PROFILE = "test"
}
agent {
kubernetes {
label 'swatch-17-kubedock-2023-12-06' // this value + unique identifier becomes the pod name
idleMinutes 5 // how long the pod will live after no jobs have run on it
defaultContainer 'openjdk17'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: kubedock
image: quay.io/cloudservices/kubedock:latest
imagePullPolicy: Always
tty: true
args:
- server
- --port-forward
# Verbosity level which is helpful to troubleshot issues when starting up containers
- -v
- 10
- name: openjdk17
image: registry.access.redhat.com/ubi9/openjdk-17-runtime
command:
- sleep
tty: true
args:
- 99d
resources:
requests:
memory: "2Gi"
cpu: "2"
limits:
memory: "6Gi"
cpu: "6"
env:
- name: DOCKER_HOST
value: tcp://127.0.0.1:2475
"""
}
}
stages {
stage('Verify PR ok to test') {
when {
beforeInput true
expression { env.CHANGE_FORK }
not {
anyOf {
// Lindsey Burnett
changeRequest author: "lindseyburnett"
// Alex Wood
changeRequest author: "awood"
// Michael Stead
changeRequest author: "mstead"
// Kevin Flaherty
changeRequest author: "kflahert"
// Barnaby Court
changeRequest author: "barnabycourt"
// Jose Carvajal
changeRequest author: "Sgitario"
// Kartik Shah
changeRequest author: "kartikshahc"
// Vanessa Busch
changeRequest author: "vbusch"
// William Poteat
changeRequest author: "wottop"
// Ryan Himmelwright
changeRequest author: "himmAllRight"
// Trayvon McKnight
changeRequest author: "TrayvonMcKnight"
// Lisa Walker
changeRequest author: "liwalker-rh"
//Diego Maranhão
changeRequest author: "diegomaranhao"
//Aurobinda Nayak
changeRequest author: "Aurobinda55"
//Marek Musil
changeRequest author: "mmusil"
}
}
}
steps {
input 'ok to test?'
}
}
stage("I'm a happy little green checkmark") {
steps {
sh "echo 'hello, world!'"
}
}
}
}