blob: 4897b240aa3657b208cfa9c94f372701807da5ab [file] [log] [blame]
Carmelo Cascone81631ed2020-08-18 19:33:25 -07001---
Emanuele Gallone3b0861c2021-11-09 16:53:57 +01002# Run pull request verify job for each fabric profile and architecture
Carmelo Cascone81631ed2020-08-18 19:33:25 -07003
4- job-template:
Emanuele Gallone3b0861c2021-11-09 16:53:57 +01005 id: 'pr-verify-{profile}-{arch}'
6 name: pr-verify-{profile}-{arch}
Carmelo Cascone81631ed2020-08-18 19:33:25 -07007
8 description: |
9 Created by {id} job-template from ci-management/jjb/templates/fabric-tna-jobs.yaml<br/>
10
11 properties:
Carmelo Cascone010ab112021-01-13 00:37:06 -080012 # Visibility restricted to because logs contain output from
Carmelo Cascone81631ed2020-08-18 19:33:25 -070013 # Barefoot toolchain (under NDA).
Carmelo Cascone010ab112021-01-13 00:37:06 -080014 - onf-infra-pronto-private:
Carmelo Cascone81631ed2020-08-18 19:33:25 -070015 - onf-infra-properties:
Carmelo Casconefe5ef682020-10-01 10:24:01 -070016 build-days-to-keep: '15'
Carmelo Cascone81631ed2020-08-18 19:33:25 -070017 artifact-num-to-keep: '-1'
18 - github:
19 url: 'https://github.com/{github-organization}/{project}'
20
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010021 project-type: pipeline
Carmelo Cascone81631ed2020-08-18 19:33:25 -070022 concurrent: true
23
24 parameters:
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010025 - string:
26 name: buildNode
27 default: "{medium-build-node}"
28 description: "Name of the Jenkins executor node to run the job on."
29 - string:
30 name: sha1
31 default: "origin/{stream}"
32 description: "SHA string of the pull request commit to build. Populated by GitHUb Pull Request Builder."
33 - string:
34 name: profile
35 default: "{profile}"
36 description: "Profile to build and test."
37 - string:
38 name: architecture
39 default: "{arch}"
40 description: "P4 architecture to use (v1model or tna)."
Carmelo Cascone81631ed2020-08-18 19:33:25 -070041
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010042 # Run pipeline that is checked-in in the same PR we want to verify.
43 pipeline-scm:
44 script-path: ".jenkins/Jenkinsfile"
45 scm:
Carmelo Cascone81631ed2020-08-18 19:33:25 -070046 - onf-infra-github-ssh-scm:
47 github-organization: '{github-organization}'
48 project: '{project}'
49 branch: "$sha1"
50 ssh-credential: "{github-onf-bot-ssh-credential}"
51
52 triggers:
53 - onf-infra-github-pr-trigger:
54 github_pr_org_list: '{obj:github_pr_org_list}'
55 github_pr_auth_id: '{github_pr_auth_id}'
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010056 status_context: 'pr-verify-{profile}-{arch}'
Carmelo Cascone81631ed2020-08-18 19:33:25 -070057
Carmelo Cascone81631ed2020-08-18 19:33:25 -070058- job-template:
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010059 id: 'postmerge-{profile}-{arch}'
60 name: 'postmerge-{profile}-{arch}'
Carmelo Cascone81631ed2020-08-18 19:33:25 -070061
62 description: |
63 Created by {id} job-template from ci-management/jjb/templates/fabric-tna-jobs.yaml<br/>
64
65 properties:
Carmelo Cascone010ab112021-01-13 00:37:06 -080066 # Visibility restricted to because logs contain output from
Carmelo Cascone81631ed2020-08-18 19:33:25 -070067 # Barefoot toolchain (under NDA).
Carmelo Cascone010ab112021-01-13 00:37:06 -080068 - onf-infra-pronto-private:
Carmelo Cascone81631ed2020-08-18 19:33:25 -070069 - onf-infra-properties:
70 build-days-to-keep: '{build-days-to-keep}'
71 artifact-num-to-keep: '-1'
72 - github:
73 url: 'https://github.com/{github-organization}/{project}'
74
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010075 project-type: pipeline
Carmelo Cascone81631ed2020-08-18 19:33:25 -070076 concurrent: true
77
78 parameters:
79 - onf-infra-github-pr-merge-parameters:
80 repo-name: '{project}'
81 repo-url: 'git@github.com:{github-organization}/{project}.git'
82 branch: '{stream}'
83 sha1: '{stream}'
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010084 - string:
85 name: buildNode
86 default: "{medium-build-node}"
87 description: "Name of the Jenkins executor node to run the job on."
88 - string:
89 name: profile
90 default: "{profile}"
91 description: "Profile to be built and tested."
92 - string:
93 name: architecture
94 default: "{arch}"
95 description: "P4 architecture to use (v1model or tna)."
Carmelo Cascone81631ed2020-08-18 19:33:25 -070096
Emanuele Gallone3b0861c2021-11-09 16:53:57 +010097 pipeline-scm:
98 script-path: ".jenkins/Jenkinsfile"
99 scm:
Carmelo Cascone81631ed2020-08-18 19:33:25 -0700100 - onf-infra-github-ssh-scm:
101 github-organization: '{github-organization}'
102 project: '{project}'
103 branch: "$commitHash"
104 ssh-credential: "{github-onf-bot-ssh-credential}"
105
106 triggers:
107 - onf-infra-github-pr-trigger-merge:
108 project: '{project}'
Carmelo Cascone9a4cbfa2020-08-19 23:11:50 -0700109 - timed: "@midnight"
Carmelo Cascone81631ed2020-08-18 19:33:25 -0700110
Darius Grassi8b7a5e62021-07-30 15:35:04 -0700111- job-template:
112 id: 'fabric-tna-linerate-tests'
113 name: 'fabric-tna-linerate-tests'
114
115 description: |
116 Created by {id} job-template from ci-management/jjb/fabric-tna-jobs.yaml, script ../pipeline/fabric-tna.groovy<br/>
117
118 # Cron syntax; trigger daily at 23:00 PST
119 triggers:
120 - timed: |
121 TZ=US/Pacific
122 H 23 * * *
123
124 properties:
125 - onf-infra-onfstaff-private:
126 - onf-infra-properties:
127 build-days-to-keep: '15'
128 artifact-num-to-keep: '15'
129
130 wrappers:
131 - lf-infra-wrappers:
132 build-timeout: '60'
133 jenkins-ssh-credential: '{github-onf-bot-ssh-credential}'
134
135 parameters:
136 - string:
137 name: BUILD_NODE
138 default: 'menlo-pdp-lotta-nics'
139 description: 'Name of the Jenkins build executor to run the job on'
140 - string:
141 name: GIT_URL
142 default: 'git@github.com:stratum/fabric-tna.git'
143 description: 'Location of fabric-tna repository that tests will check'
144 - string:
145 name: GIT_BRANCH
146 default: 'main'
147 description: 'Name of Git branch to pull from fabric-tna repository'
148 - string:
149 name: PROFILE
150 default: 'fabric-spgw-int'
151 description: 'Name of the flavor of linerate tests to run'
152 - string:
153 name: SWITCH_IP
154 default: '10.128.13.29'
155 description: 'Address of the Stratum service (P4Runtime, gNMI, etc.) running on the remote switch'
156 - string:
157 name: STRATUM_PORT
158 default: '28000'
159 description: 'Port of the Stratum service (P4Runtime, gNMI, etc.) running on the remote switch'
160
161 project-type: pipeline
162 concurrent: true
163 extraEnvironmentVars: ""
164 sandbox: true
165
166 dsl: !include-raw-escape: ../pipeline/fabric-tna-hardware.groovy