summaryrefslogtreecommitdiffstats
path: root/jjb/global-templates-c.yaml
blob: f78cce76a4d772be48dffc1a775f24dd0542202f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
####################
# COMMON FUNCTIONS #
####################

- c_job_common: &c_job_common
    name: c-job-common

    ######################
    # Default parameters #
    ######################

    branch: master
    submodule-recursive: true
    submodule-disable: false
    submodule-timeout: 10

    #####################
    # Job Configuration #
    #####################

    project-type: freestyle
    node: '{build-node}'
    disabled: false

    properties:
      - infra-properties:
          build-days-to-keep: '{build-days-to-keep}'

    parameters:
      - lf-infra-parameters:
          project: '{project}'
          branch: '{branch}'
          stream: '{stream}'

    scm:
      - lf-infra-gerrit-scm:
          jenkins-ssh-credential: '{jenkins-ssh-credential}'
          git-url: '$GIT_URL/$PROJECT'
          refspec: '$GERRIT_REFSPEC'
          branch: '$GERRIT_BRANCH'
          submodule-recursive: '{submodule-recursive}'
          submodule-disable: '{submodule-disable}'
          submodule-timeout: '{submodule-timeout}'
          choosing-strategy: default

    wrappers:
      - lf-infra-wrappers:
          build-timeout: '{build-timeout}'
          jenkins-ssh-credential: '{jenkins-ssh-credential}'

    publishers:
      - lf-infra-publish

- job-template:
    #
    # job template for build C/C++ project
    #
    # Required Variables:
    #   script:         build script to execute
    #
    name: '{project-name}-{stream}-verify-c'
    id: gerrit-verify-c
    <<: *c_job_common

    triggers:
      - gerrit-trigger-patch-submitted:
          server: '{server-name}'
          project: '{project}'
          branch: '{branch}'
          files: '**'

    builders:
      - lf-infra-pre-build
      - shell: '{script}'

- job-template:
    # Job template for building & pushing docker images
    #
    # The purpose of this job template is to run:
    #  1. login to the docker registry
    #  2. run a specified shell builder
    #
    name: '{project-name}-{stream}-docker-c-shell-daily'
    id: gerrit-docker-c-shell-daily
    <<: *c_job_common
    node: 'ubuntu1804-docker-8c-8g'

    triggers:
      # 12 AM UTC
      - timed: '@daily'
      - gerrit-trigger-release-manually:
          server: '{server-name}'
          project: '{project}'
          branch: '{branch}'

    builders:
      - lf-infra-pre-build
      - provide-maven-settings:
          global-settings-file: 'global-settings'
          settings-file: '{mvn-settings}'
      - docker-login
      - shell: '{script}'