-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
61 lines (49 loc) · 1.3 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
#!groovy
def cronSettings = "0 20 * * *"
env.branch = ""
env.commitid = ""
pipeline {
agent {
label "linux_node"
} // agent
options {
skipDefaultCheckout()
buildDiscarder(logRotator(numToKeepStr: '15', artifactNumToKeepStr: '15'))
timestamps()
}
triggers {
cron(cronSettings)
}
stages {
stage("Checkout repo"){
when {
branch BRANCH_NAME
}
steps {
deleteDir()
checkout scm
script {
env.commitid = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
env.branch = BRANCH_NAME
}
}
}
stage("Trigger Downstream Job"){
when {
branch BRANCH_NAME
}
parallel {
stage("zephyr_linux_build") {
steps{
build(job: "zephyr_linux", propagate: true, wait: true)
}
}
stage("zephyr_windows_build") {
steps{
build(job: "zephyr_windows", propagate: true, wait: true)
}
}
}
}
}
}// pipeline