blob: 4669e826d8f3ac973cddb8408c329d211b46e667 [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
15 submodule-timeout: 10
16
17 #####################
18 # Job Configuration #
19 #####################
20
21 project-type: freestyle
22 node: '{build-node}'
23 disabled: false
24
25 properties:
26 - infra-properties:
27 build-days-to-keep: '{build-days-to-keep}'
28
29 parameters:
30 - lf-infra-parameters:
31 project: '{project}'
32 branch: '{branch}'
33 stream: '{stream}'
34
35 scm:
36 - lf-infra-gerrit-scm:
37 jenkins-ssh-credential: '{jenkins-ssh-credential}'
38 git-url: '$GIT_URL/$PROJECT'
39 refspec: '$GERRIT_REFSPEC'
40 branch: '$GERRIT_BRANCH'
41 submodule-recursive: '{submodule-recursive}'
42 submodule-timeout: '{submodule-timeout}'
43 choosing-strategy: default
44
45 wrappers:
46 - lf-infra-wrappers:
47 build-timeout: '{build-timeout}'
48 jenkins-ssh-credential: '{jenkins-ssh-credential}'
49
50 publishers:
51 - lf-infra-publish
52
53#################
54# JOB TEMPLATES #
55#################
NingSunfd33dba2018-03-08 16:11:39 -080056
57- job-template:
58 #
59 # job template for build C/C++ project
60 #
61 # Required Variables:
62 # script: build script to execute
63 #
NingSunfd33dba2018-03-08 16:11:39 -080064 name: '{project-name}-{stream}-verify-c'
Jessica Wagantall9df55422019-04-19 17:09:34 -070065 id: gerrit-verify-c
66 <<: *c_job_common
NingSunfd33dba2018-03-08 16:11:39 -080067
68 triggers:
69 - gerrit-trigger-patch-submitted:
70 server: '{server-name}'
71 project: '{project}'
72 branch: '{branch}'
73 files: '**'
74
75 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -070076 - lf-infra-pre-build
NingSunfd33dba2018-03-08 16:11:39 -080077 - shell: '{script}'
78
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070079- job-template:
80 # Job template for building & pushing docker images
81 #
82 # The purpose of this job template is to run:
83 # 1. login to the docker registry
84 # 2. run a specified shell builder
85 #
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070086 name: '{project-name}-{stream}-docker-c-shell-daily'
Jessica Wagantall9df55422019-04-19 17:09:34 -070087 id: gerrit-docker-c-shell-daily
88 <<: *c_job_common
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070089 node: 'ubuntu1604-docker-8c-8g'
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070090
91 triggers:
92 # 12 AM UTC
Gary Wu5f4277f2018-09-28 10:36:23 -070093 - timed: '@daily'
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -070094 - gerrit-trigger-release-manually:
95 server: '{server-name}'
96 project: '{project}'
97 branch: '{branch}'
98
99 builders:
Jessica Wagantall05ae7da2018-10-22 17:32:33 -0700100 - lf-infra-pre-build
Manjunath Ranganathaiah9d6c8232018-08-15 11:42:10 -0700101 - provide-maven-settings:
102 global-settings-file: 'global-settings'
103 settings-file: '{mvn-settings}'
104 - docker-login
105 - shell: '{script}'