blob: 40c517063f2d33ab4a6ed9f1e5699b316c212ad2 [file] [log] [blame]
NingSunfd33dba2018-03-08 16:11:39 -08001---
Jessica Wagantall9df55422019-04-19 17:09:34 -07002####################
3# COMMON FUNCTIONS #
4####################
5
6- c_job_common: &c_job_common
7 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
23 node: '{build-node}'
24 disabled: false
25
26 properties:
27 - infra-properties:
28 build-days-to-keep: '{build-days-to-keep}'
29
30 parameters:
31 - lf-infra-parameters:
32 project: '{project}'
33 branch: '{branch}'
34 stream: '{stream}'
35
36 scm:
37 - lf-infra-gerrit-scm:
38 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}'
Jessica Wagantall57ed49e2019-05-14 18:57:35 -070043 submodule-disable: '{submodule-disable}'
Jessica Wagantall9df55422019-04-19 17:09:34 -070044 submodule-timeout: '{submodule-timeout}'
45 choosing-strategy: default
46
47 wrappers:
48 - lf-infra-wrappers:
49 build-timeout: '{build-timeout}'
50 jenkins-ssh-credential: '{jenkins-ssh-credential}'
51
52 publishers:
53 - lf-infra-publish
54
55#################
56# JOB TEMPLATES #
57#################
NingSunfd33dba2018-03-08 16:11:39 -080058
59- job-template:
60 #
61 # job template for build C/C++ project
62 #
63 # Required Variables:
64 # script: build script to execute
65 #
NingSunfd33dba2018-03-08 16:11:39 -080066 name: '{project-name}-{stream}-verify-c'
Jessica Wagantall9df55422019-04-19 17:09:34 -070067 id: gerrit-verify-c
68 <<: *c_job_common
NingSunfd33dba2018-03-08 16:11:39 -080069
70 triggers:
71 - gerrit-trigger-patch-submitted:
72 server: '{server-name}'
73 project: '{project}'
74 branch: '{branch}'
75 files: '**'
76
77 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -070078 - lf-infra-pre-build
NingSunfd33dba2018-03-08 16:11:39 -080079 - shell: '{script}'
80
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070081- job-template:
82 # Job template for building & pushing docker images
83 #
84 # The purpose of this job template is to run:
85 # 1. login to the docker registry
86 # 2. run a specified shell builder
87 #
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070088 name: '{project-name}-{stream}-docker-c-shell-daily'
Jessica Wagantall9df55422019-04-19 17:09:34 -070089 id: gerrit-docker-c-shell-daily
90 <<: *c_job_common
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070091 node: 'ubuntu1604-docker-8c-8g'
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070092
93 triggers:
94 # 12 AM UTC
Gary Wu5f4277f2018-09-28 10:36:23 -070095 - timed: '@daily'
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070096 - gerrit-trigger-release-manually:
97 server: '{server-name}'
98 project: '{project}'
99 branch: '{branch}'
100
101 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -0700102 - lf-infra-pre-build
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -0700103 - provide-maven-settings:
104 global-settings-file: 'global-settings'
105 settings-file: '{mvn-settings}'
106 - docker-login
107 - shell: '{script}'