-
Notifications
You must be signed in to change notification settings - Fork 5
/
JenkinsFile.1
57 lines (39 loc) · 1.06 KB
/
JenkinsFile.1
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
#!/usr/bin/env groovy
def globals =[
jobsBranchSource: "master",
jobPrefix: "seeded.",
jobSuffix: ".pipeline",
jenkinsJobsFolder: "jenkinsjobs",
seededRepoUrl: "https://github.com/tomerb3/supremedevops.git",
listViewName: "Deployments"
]
def config = [
jobs: [
[ name: "${globals.jobPrefix}itc-post-build-seed",
description: "This job runs all other jobs with SkipRun parameter set to true, to update their UI parameters",
repositoryUrl:"${globals.seededRepoUrl}",
branch:"${globals.jobsBranchSource}",
jenkinsFilePath:"${globals.jenkinsJobsFolder}/Jenkinsfile.post.seed",
inListView:false,
]
]
]
//============= Generating pipline jobs
config.jobs.each{ curJob ->
pipelineJob(curJob.name){
description(curJob.description)
definition{
cpsScm{
scm{
git{
remote{
url("${curJob.repositoryUrl}")
}
branch("${curJob.branch}")
}
}
scriptPath("${curJob.jenkinsFilePath}")
}
}
}
}