1
- // parameters([
2
- // ])
3
- // [disableConcurrentBuilds(abortPrevious: true)]
4
- properties([buildDiscarder(logRotator(daysToKeepStr : ' 30' ))])
5
- node (' podman_test' ){
1
+ properties([buildDiscarder(logRotator(daysToKeepStr : ' 30' )),
2
+ parameters([
3
+ booleanParam( name : ' RESET_CI_PROGRESS' ,
4
+ defaultValue : false ,
5
+ description : " Change to \' true\' to erase CI job progress. This will start again at the build, then simics and hardware<br>This is useful for picking up a newer backing build" ),
6
+ string( name : ' EBMC_PIPELINES_BRANCH' ,
7
+ defaultValue : ' refs/remotes/origin/pr/1283' ,
8
+ description : " power-devops/ebmc-pipelines branch identifier, Can be branch name or refspec (refs/remotes/origin/pr/#)" )
9
+ ])
10
+ ])
11
+
12
+ ansiColor(' xterm' ) {
13
+ node(' redhat-8' ) {
6
14
timestamps {
7
- ansiColor(" xterm" ) {
8
- stage(' op-build compile' ) {
9
-
15
+ stage(' Load libraries' ) {
10
16
cleanWs()
17
+ load_library ebmc_pipelines : env. EBMC_PIPELINES_BRANCH ,
18
+ ebmc_verified : ' main'
19
+
20
+ }
21
+ def fw_level = ' fw1060' // master-p10
22
+ def job_build_path = " pse-jet-sys-powerfw-generic-local/${ currentBuild.fullProjectName} /${ currentBuild.id} /"
23
+ def change_identifiers = [:]
24
+ if (env. ghprbActualCommit) {
25
+ // ibm-release-fw1020
26
+ // release-fw1030
27
+ if (env. ghprbTargetBranch. contains(' release-fw10' )) {
28
+ fw_level = env. ghprbTargetBranch. split(' -' )[-1 ]
29
+ }
30
+ job_build_path = " pse-jet-sys-powerfw-generic-local/${ github.get_org_name()} /${ github.get_repo_name()} /${ env.ghprbTargetBranch} /${ github.get_pr_number()} /${ github.get_short_hash()} /"
31
+ currentBuild. displayName = " #${ env.BUILD_NUMBER} ${ env?.ghprbPullTitle} "
32
+ currentBuild. description = " ${ env?.ghprbActualCommitAuthor} <br><a href=${ env?.ghprbPullLink} >${ github.get_short_hash()} </a>"
33
+
34
+ change_identifiers. CHANGE_URL = env?. ghprbPullLink
35
+ change_identifiers. CHANGE_REPO = env?. ghprbGhRepository
36
+ change_identifiers. CHANGE_ID = " pull/${ github.get_pr_number()} "
37
+ change_identifiers. CHANGE_TARGET = env?. ghprbTargetBranch
38
+ change_identifiers. CHANGE_COMMIT_HASH = env?. ghprbActualCommit
39
+ change_identifiers. CHANGE_AUTHOR_DISPLAY_NAME = env?. ghprbActualCommitAuthor
40
+ change_identifiers. CHANGE_AUTHOR_EMAIL = env?. ghprbActualCommitAuthorEmail
41
+ change_identifiers. CHANGE_TITLE = env?. ghprbPullTitle
42
+ change_identifiers. EBMC_PIPELINES_BRANCH = env. EBMC_PIPELINES_BRANCH
43
+ }
44
+
45
+ if (env?. RESET_CI_PROGRESS == ' true' ) {
46
+ sh script :""" #!/bin/bash -e
47
+ jf rt search ${ job_build_path}
48
+ jf rt delete --quiet ${ job_build_path}
49
+ """
50
+ }
51
+
52
+ def simics_configs = [ " everest" ,
53
+ " rainier_2s2u" ,
54
+ " rainier_2s2u_opal_rhel" ,
55
+ " rainier_2s4u" ]
56
+
57
+ // fw1060 is default
58
+ def hardware_configs = [" 1060-rainier" ,
59
+ " 1060-everest" ,
60
+ " bonnell" ]
61
+
62
+ if (fw_level != ' fw1060' ) {
63
+ hardware_configs = [' 1050-rainier' ]
64
+ }
11
65
12
- sh ''' #!/bin/bash -e
13
- git clone --recurse-submodules --single-branch --branch master-p10 [email protected] :open-power/op-build.git $WORKSPACE/op-build
14
- cd $WORKSPACE/op-build
15
- if [[ "$CHANGE_ID" != "" ]]; then
16
- git fetch origin pull/$CHANGE_ID/head
17
- git checkout -b $CHANGE_ID FETCH_HEAD
18
- fi
66
+ def fw_config = load_ebmc_verified FW_LEVEL : fw_level
67
+
68
+ // unique to pr patchset and fw level
69
+ // these will be published to a
19
70
20
- ci/ibm/podman_jenkins.sh
71
+ def opbuild = [ AGENT : ' redhat-8 && aus.stglabs.ibm.com' , // needs austin machine
72
+ CONFIG : ' p10ebmc' ,
73
+ PATCHED_REPO : change_identifiers. CHANGE_REPO ,
74
+ PATCHED_BRANCH : change_identifiers. CHANGE_TARGET ,
75
+ PATCHED_CHANGE : github. get_pr_number(),
76
+ BUILD_PATH : " ${ job_build_path} /op-build/master-p10/p10ebmc" ,
77
+ POST_STATUS : ' IBM op-build' ]
78
+ opbuild + = change_identifiers
79
+
80
+ def ebmc_pkg = [AGENT : ' redhat-8 && rchland.ibm.com' , // closer to afs mounts
81
+ CHIP : ' p10ebmc' ,
82
+ OPBUILD_BUILD : opbuild. BUILD_PATH ,
83
+ EBMC_BUILD : fw_config. EBMC_BUILD ,
84
+ EBMC_PKG_TOOLS : fw_config. EBMC_PKG_TOOLS ,
85
+ BUILD_PATH : " ${ job_build_path} /ebmc-pkg/p10ebmc" ,
86
+ POST_STATUS : ' IBM eBMC' ]
87
+ ebmc_pkg + = change_identifiers
88
+
89
+ def simics_jobs = [:]
90
+ simics_configs. each { name ->
91
+ def job_params = [:]
92
+ job_params + = change_identifiers
93
+ job_params. MACHINE = name
94
+ job_params. EBMC_BUILD = ebmc_pkg. BUILD_PATH
95
+ job_params. SIMICS_BUILD = fw_config. SIMICS_BUILD
96
+ job_params. SIMULATION_TEST = fw_config. SIMULATION_TEST
97
+ job_params. EBMC_TEST_AUTOMATION = fw_config. EBMC_TEST_AUTOMATION
98
+ job_params. OPENBMC_TEST_AUTOMATION = fw_config. OPENBMC_TEST_AUTOMATION
99
+ job_params. BUILD_PATH = " ${ job_build_path} /simics-ci/${ name} "
100
+ job_params. POST_STATUS = " IBM simics ${ name} "
21
101
22
- '''
23
- def artifacts = [' upload.log' ]
24
- archiveArtifacts artifacts : artifacts. join(' , ' ), allowEmptyArchive : true
102
+ simics_jobs. " ${ name} " = {
103
+ stage(" Simics ${ name} " ) {
104
+ job retry : true ,
105
+ job_path : " ../simics-ci/${ name} " ,
106
+ parameters : job_params
107
+ }
108
+ }
109
+ }
110
+ def hardware_jobs = [:]
111
+ hardware_configs. each { name ->
112
+ def job_params = [:]
113
+ job_params + = change_identifiers
114
+ job_params. MACHINE = name
115
+ job_params. EBMC_BUILD = ebmc_pkg. BUILD_PATH
116
+ job_params. EBMC_TEST_AUTOMATION = fw_config. EBMC_TEST_AUTOMATION
117
+ job_params. OPENBMC_TEST_AUTOMATION = fw_config. OPENBMC_TEST_AUTOMATION
118
+ job_params. OPENBMC_BUILD_SCRIPTS = fw_config. OPENBMC_BUILD_SCRIPTS
119
+ job_params. BUILD_PATH = " ${ job_build_path} /hardware-ci/${ name} "
120
+ job_params. POST_STATUS = " IBM hardware ${ name} "
121
+
122
+ hardware_jobs. " ${ name} " = {
123
+ stage(" Hardware ${ name} " ) {
124
+ job job_path : " ../hardware-ci/${ name} " ,
125
+ parameters : job_params
126
+ }
127
+ }
128
+ }
129
+
130
+ // jf rt delete pse-jet-sys-powerfw-generic-local/open-power/op-build/master-p10/5767/b385b7ba
131
+ def result = ' SUCCESS'
132
+ stage(" Build op-build" ) {
133
+
134
+ job job_path : ' ../openpower-ci/p10ebmc' ,
135
+ parameters : opbuild
136
+
137
+ }
25
138
26
- // cleanWs()
139
+ stage(" Build eBMC" ) {
140
+
141
+ job job_path : ' ../ebmc-pkg/p10ebmc' ,
142
+ parameters : ebmc_pkg
143
+
27
144
}
145
+
146
+ parallel simics_jobs
147
+
148
+ parallel hardware_jobs
149
+
150
+ }
28
151
}
29
152
}
30
- }
0 commit comments