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