-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathJenkinsfile
More file actions
44 lines (37 loc) · 1.11 KB
/
Jenkinsfile
File metadata and controls
44 lines (37 loc) · 1.11 KB
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
#!/usr/bin/env groovy
final String mainBranchToTest = 'master'
env.GIT_DEFAULT_BRANCH = mainBranchToTest
final String logsKeptCount = '10'
final short buildTimeout = 60
final Boolean isMainBranch = BRANCH_NAME == mainBranchToTest
if (!isMainBranch) stopOlderBuilds()
pipeline {
agent none
options {
buildDiscarder(logRotator(numToKeepStr: logsKeptCount))
timeout(time: buildTimeout, unit: 'MINUTES')
}
stages {
stage('Update Jenkins jobs') {
agent any
when { branch mainBranchToTest }
steps {
sh 'printenv | sort'
script {
final List jobs = load 'jenkins/jobs.groovy'
createJobs jobs
}
}
}
stage('Publish release version') {
agent any
when { branch mainBranchToTest }
steps {
sh 'printenv | sort'
script {
build(job: '/android-jobs/template-plugin/template-plugin-publish-release', wait: false)
}
}
}
}
}