blob: 7e25869b4e331051b9d884089740f53a4474cac2 [file] [log] [blame]
NingSunfd33dba2018-03-08 16:11:39 -08001---
Jessica Wagantall9df55422019-04-19 17:09:34 -07002####################
3# COMMON FUNCTIONS #
4####################
5
Anil Belur7b3203a2023-04-14 21:54:49 +10006- _c_job_common: &c_job_common
Jessica Wagantall9df55422019-04-19 17:09:34 -07007 name: c-job-common
8
9 ######################
10 # Default parameters #
11 ######################
12
13 branch: master
14 submodule-recursive: true
Jessica Wagantall57ed49e2019-05-14 18:57:35 -070015 submodule-disable: false
Jessica Wagantall9df55422019-04-19 17:09:34 -070016 submodule-timeout: 10
17
18 #####################
19 # Job Configuration #
20 #####################
21
22 project-type: freestyle
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070023 node: "{build-node}"
Jessica Wagantall9df55422019-04-19 17:09:34 -070024 disabled: false
25
26 properties:
27 - infra-properties:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070028 build-days-to-keep: "{build-days-to-keep}"
Jessica Wagantall9df55422019-04-19 17:09:34 -070029
30 parameters:
31 - lf-infra-parameters:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070032 project: "{project}"
33 branch: "{branch}"
34 stream: "{stream}"
Jessica Wagantall9df55422019-04-19 17:09:34 -070035
36 scm:
37 - lf-infra-gerrit-scm:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070038 jenkins-ssh-credential: "{jenkins-ssh-credential}"
39 git-url: "$GIT_URL/$PROJECT"
40 refspec: "$GERRIT_REFSPEC"
41 branch: "$GERRIT_BRANCH"
42 submodule-recursive: "{submodule-recursive}"
43 submodule-disable: "{submodule-disable}"
44 submodule-timeout: "{submodule-timeout}"
Jessica Wagantall9df55422019-04-19 17:09:34 -070045 choosing-strategy: default
46
47 wrappers:
48 - lf-infra-wrappers:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070049 build-timeout: "{build-timeout}"
50 jenkins-ssh-credential: "{jenkins-ssh-credential}"
Jessica Wagantall9df55422019-04-19 17:09:34 -070051
52 publishers:
53 - lf-infra-publish
54
NingSunfd33dba2018-03-08 16:11:39 -080055- job-template:
56 #
57 # job template for build C/C++ project
58 #
59 # Required Variables:
60 # script: build script to execute
61 #
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070062 name: "{project-name}-{stream}-verify-c"
Jessica Wagantall9df55422019-04-19 17:09:34 -070063 id: gerrit-verify-c
64 <<: *c_job_common
NingSunfd33dba2018-03-08 16:11:39 -080065
66 triggers:
67 - gerrit-trigger-patch-submitted:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070068 server: "{server-name}"
69 project: "{project}"
70 branch: "{branch}"
71 files: "**"
NingSunfd33dba2018-03-08 16:11:39 -080072
73 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -070074 - lf-infra-pre-build
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070075 - shell: "{script}"
NingSunfd33dba2018-03-08 16:11:39 -080076
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070077- job-template:
78 # Job template for building & pushing docker images
79 #
80 # The purpose of this job template is to run:
81 # 1. login to the docker registry
82 # 2. run a specified shell builder
83 #
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070084 name: "{project-name}-{stream}-docker-c-shell-daily"
Jessica Wagantall9df55422019-04-19 17:09:34 -070085 id: gerrit-docker-c-shell-daily
86 <<: *c_job_common
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070087 node: "ubuntu1804-docker-8c-8g"
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070088
89 triggers:
90 # 12 AM UTC
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070091 - timed: "@daily"
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070092 - gerrit-trigger-release-manually:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -070093 server: "{server-name}"
94 project: "{project}"
95 branch: "{branch}"
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070096
97 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -070098 - lf-infra-pre-build
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070099 - provide-maven-settings:
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700100 global-settings-file: "global-settings"
101 settings-file: "{mvn-settings}"
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -0700102 - docker-login
Andrew Grimbergc1f3caf2023-05-03 09:25:07 -0700103 - shell: "{script}"