forked from CpanelInc/ea-freetds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
38 lines (33 loc) · 1.45 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
#!groovy
properties([
// Our integration with OBS can only follow one build per OBS project; if
// multiple builds occur, all running jobs will wait for the last build in
// the OBS project to complete. To help avoid confusing waits, disable
// cuncurrent builds for *this one* job in Jenkins (note: each branch is a
// separate job). Other jobs can still run concurrently, but if they use
// the same OBS project, they will have the extra wait.
disableConcurrentBuilds(),
pipelineTriggers([
// Enable SCM triggering of builds via a webhook, so BitBucket can tell
// us when we need to check for new commits.
pollSCM(''),
]),
])
// Allow parameterized builds on all branches other than master & production
if ( !env.BRANCH_NAME.equals('master') && !env.BRANCH_NAME.equals('production') ) {
properties([
parameters([
string(defaultValue: 'master', description: 'The branch of the ea-tools repository to use for building; defaults to "master".', name: 'EA_TOOLS_BRANCH')
]),
])
}
// fileLoader implicitly uses an executor, so ensure this invocation is outside
// the 'node' block; otherwise, you risk resource starvation
def ea4 = fileLoader.fromGit([
'jenkins/ea4-lib',
'ssh://git@enterprise.cpanel.net:7999/ea4/ea-tools.git',
params.EA_TOOLS_BRANCH ?: 'master',
env.CREDENTIALS_ID_FOR_MAIN_REPOSITORY_HOST,
''
])
node('tool:OBS && project:EA4') { ea4.modulino() }