-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
48 lines (40 loc) · 1.11 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
@Library('ni-utils') _
//service name is extrapolated from repository name
def svcName = currentBuild.rawBuild.project.parent.displayName
//get pod template definition
def pod = libraryResource 'org/foo/k8s-pod-template.yaml'
def image_dependencies =
'''
- name: fermium-alpine
image: node:fermium-alpine
imagePullPolicy: IfNotPresent
command:
- cat
tty: true
'''
def template_vars = [
'build_label': 'datascience',
'node_version' :'fermium',
'image_dependencies' : [image_dependencies]
]
pod = renderTemplate(pod, template_vars)
// def sharedLibrary = new com.org.foo.sharedLibrary()
def compileData = [run: true]
def testData = [run: true]
def artifactData = [run: true]
def intTestData = [run: true]
def deploymentData = [run: true]
def afterDeployData = [run: true]
def buildCommands = [
compileData: compileData,
testData: testData,
artifactData: artifactData,
intTestData: intTestData,
deploymentData: deploymentData,
afterDeployData: afterDeployData
]
// Set slack channel
def slackChannel = "k8s-jenkins"
timestamps {
pipeline(svcName, pod)
}