Merge "Fix Yamllint violation for jjb/doctor"
[releng.git] / jjb / dovetail / dovetail-artifacts-upload.yml
1 ############################################
2 # dovetail upload artifacts job
3 ############################################
4 - project:
5     name: dovetail-artifacts-upload
6
7     project: 'dovetail'
8
9     jobs:
10         - 'dovetail-{image}-artifacts-upload-{stream}'
11
12     stream:
13         - master:
14             branch: '{stream}'
15             gs-pathname: ''
16             disabled: false
17
18     image:
19         - 'dovetail'
20         - 'functest'
21         - 'yardstick'
22         - 'testapi'
23         - 'mongo'
24
25 #############################################
26 # job template
27 #############################################
28
29 - job-template:
30     name: 'dovetail-{image}-artifacts-upload-{stream}'
31
32
33     disabled: '{obj:disabled}'
34
35     concurrent: true
36
37     properties:
38         - logrotate-default
39         - throttle:
40             enabled: true
41             max-total: 1
42             max-per-node: 1
43             option: 'project'
44
45     parameters:
46         - project-parameter:
47             project: '{project}'
48             branch: '{branch}'
49         - 'opnfv-build-ubuntu-defaults'
50         - dovetail-parameter:
51             gs-pathname: '{gs-pathname}'
52             image: '{image}'
53             branch: '{branch}'
54
55     scm:
56         - git-scm
57
58     builders:
59         - 'dovetail-builder-artifacts-upload'
60         - 'dovetail-upload-artifacts-cache-cleanup'
61         - 'dovetail-images-cleanup'
62
63 ####################
64 # parameter macros
65 ####################
66 - parameter:
67     name: dovetail-parameter
68     parameters:
69         - string:
70             name: CACHE_DIR
71             default: $WORKSPACE/cache{gs-pathname}
72             description: "the cache to store packages downloaded"
73         - string:
74             name: STORE_URL
75             default: gs://artifacts.opnfv.org/dovetail{gs-pathname}
76             description: "LF artifacts url for storage of dovetail packages"
77         - string:
78             name: DOCKER_REPO_NAME
79             default: opnfv/{image}
80             description: "docker repo name"
81         - string:
82             name: DOCKER_TAG
83             default: latest
84             description: "docker image tag of which will be uploaded to artifacts"
85         - string:
86             name: STORE_FILE_NAME
87             default: image_{image}_{branch}_$BUILD_ID.docker
88             description: "stored file name"
89
90 ####################################
91 #builders for dovetail project
92 ####################################
93 - builder:
94     name: dovetail-builder-artifacts-upload
95     builders:
96         - shell:
97             !include-raw: ./dovetail-artifacts-upload.sh
98
99 - builder:
100     name: dovetail-upload-artifacts-cache-cleanup
101     builders:
102         - shell: |
103             #!/bin/bash
104             set -o errexit
105
106             echo "Dovetail: cleanup cache used for storage downloaded packages"
107
108             /bin/rm -rf $CACHE_DIR
109
110 - builder:
111     name: dovetail-images-cleanup
112     builders:
113         - shell:
114             !include-raw: ./dovetail-cleanup.sh