blob: 5f273fcf51c4940b5e6daa388814b6b9ae728f69 [file] [log] [blame]
Zack Williamsbe2f86f2019-09-30 22:39:13 -07001---
2# sync built directory to a remote server
3
4- job-template:
5 id: sync-dir
6 name: "sync-dir_{project}"
7 description: |
8 Created by {id} job-template from ci-management/jjb/templates/sync-dir.yaml
9 After merge run a build step then upload files to a directory remote server.
10
11 parameters:
12 - string:
13 name: BUILD_COMMAND
14 default: '{build-command}'
15 description: 'Name of the command to run to generate artifacts'
16
17 - string:
18 name: BUILD_OUTPUT_PATH
19 default: '{build-output-path}'
20 description: 'Path of files where build output is created by build command, relative to code checkout location'
21
22 - string:
23 name: SYNC_TARGET_SERVER
24 default: '{sync-target-server}'
25 description: 'Name of server where built files will be synced'
26
27 - string:
28 name: SYNC_TARGET_PATH
29 default: '{sync-target-path}'
30 description: 'Directory path on target server where the files will be synced'
31
32 triggers:
33 - cord-infra-gerrit-trigger-merge:
34 gerrit-server-name: '{gerrit-server-name}'
35 project-regexp: '^{project}$'
36 branch-regexp: '{branch-regexp}'
37 file-include-regexp: '{all-files-regexp}'
38 dependency-jobs: '{dependency-jobs}'
39
40 properties:
41 - cord-infra-properties:
42 build-days-to-keep: '{build-days-to-keep}'
43 artifact-num-to-keep: '{artifact-num-to-keep}'
44
45 wrappers:
46 - onf-infra-rsync-wrappers:
47 build-timeout: '{build-timeout}'
48 jenkins-ssh-credential: '{gerrit-ssh-credential}'
49
50 scm:
51 - lf-infra-gerrit-scm:
52 git-url: '$GIT_URL/$GERRIT_PROJECT'
53 refspec: '$GERRIT_REFSPEC'
54 branch: '$GERRIT_BRANCH'
Zack Williamsccc14742020-01-22 13:15:59 -070055 submodule-disable: '{submodule-disable}'
Zack Williamsbe2f86f2019-09-30 22:39:13 -070056 submodule-recursive: 'false'
Zack Williamsccc14742020-01-22 13:15:59 -070057 submodule-timeout: '{submodule-timeout}'
Zack Williamsbe2f86f2019-09-30 22:39:13 -070058 choosing-strategy: gerrit
59 jenkins-ssh-credential: '{gerrit-ssh-credential}'
60
61 node: '{build-node}'
62 project-type: freestyle
63 concurrent: true
64
65 builders:
66 - shell: !include-raw-escape: ../shell/sync-dir.sh
67