Merge "jjb def for DCAEGEN2 components"
[ci-management.git] / jjb / ci-management / ci-management.yaml
1 ---
2 - project:
3     name: ci-management-jobs
4     jobs:
5       - '{project-name}-ci-jobs'
6
7     project: 'ci-management'
8     project-name: 'ci-management'
9     archive-artifacts: '**/*.log'
10     branch: 'master'
11     build-timeout: '60'
12     build-node: 'centos7-basebuild-2c-1g'
13
14 - project:
15     name: packer-jobs
16     # packer jobs templates are defined in global-jjb
17     jobs:
18       - '{project-name}-packer-jobs'
19     project: 'ci-management'
20     project-name: 'ci-management'
21     branch: master
22     archive-artifacts: '**/*.log'
23     build-node: 'centos7-basebuild-2c-1g'
24     platforms:
25       - centos
26       - ubuntu-16.04
27     templates:
28       - basebuild
29       - docker
30       - memcached
31       - redis
32     exclude:
33       # only build the docker image on ubuntu at present
34       - platforms: centos
35         templates: docker
36
37 - job-template:
38     name: '{project}-verify-jjb'
39
40     project-type: freestyle
41     node: '{build-node}'
42     concurrent: true
43
44     properties:
45       - infra-properties:
46           build-days-to-keep: 14
47
48     parameters:
49       - infra-parameters:
50           project: '{project}'
51           branch: 'master'
52           refspec: 'refs/heads/master'
53           artifacts: '{archive-artifacts}'
54
55     scm:
56       - gerrit-trigger-scm:
57           refspec: '$GERRIT_REFSPEC'
58           choosing-strategy: 'gerrit'
59           submodule-recursive: '{submodule-recursive}'
60
61     wrappers:
62       - infra-wrappers:
63           build-timeout: '{build-timeout}'
64
65     triggers:
66       - gerrit-trigger-patch-submitted:
67           server: '{server-name}'
68           project: '{project}'
69           branch: '{branch}'
70           files: 'jjb/**'
71
72     builders:
73       - config-file-provider:
74           files:
75             - file-id: 'jjbini'
76               variable: 'JJBINI'
77       - shell: |
78           virtualenv $WORKSPACE/venv
79           source $WORKSPACE/venv/bin/activate
80           pip install --upgrade pip
81           pip freeze
82           pip install jenkins-job-builder
83           jenkins-jobs -l DEBUG --conf $JJBINI test -o archives/job_output jjb/
84           gzip archives/job_output/*
85       - ci-management-check-unicode
86
87     publishers:
88       - infra-shiplogs:
89           maven-version: '{maven-version}'
90
91 - job-template:
92     name: '{project}-merge-jjb'
93
94     project-type: freestyle
95     node: '{build-node}'
96
97     properties:
98       - infra-properties:
99           build-days-to-keep: 14
100
101     parameters:
102       - infra-parameters:
103           project: '{project}'
104           branch: 'master'
105           refspec: 'refs/heads/master'
106           artifacts: '{archive-artifacts}'
107
108     scm:
109       - gerrit-trigger-scm:
110           refspec: ''
111           choosing-strategy: 'default'
112           submodule-recursive: '{submodule-recursive}'
113
114     wrappers:
115       - infra-wrappers:
116           build-timeout: '{build-timeout}'
117
118     triggers:
119       - gerrit-trigger-patch-merged:
120           server: '{server-name}'
121           project: '{project}'
122           branch: '{branch}'
123           files: 'jjb/**'
124
125     builders:
126       - config-file-provider:
127           files:
128             - file-id: 'jjbini'
129               variable: 'JJBINI'
130       - shell: |
131           virtualenv $WORKSPACE/venv
132           source $WORKSPACE/venv/bin/activate
133           pip install --upgrade pip
134           pip freeze
135           pip install jenkins-job-builder
136           jenkins-jobs --conf $JJBINI update --delete-old --workers 4 jjb/
137
138     publishers:
139       - infra-shiplogs:
140           maven-version: '{maven-version}'