blob: 377d9a8e1e0bdf522f2aee666d5ed20cdac62cd8 [file] [log] [blame]
Zack Williamsbe2f86f2019-09-30 22:39:13 -07001---
Joey Armstrong6a9013e2024-02-01 17:56:57 -05002# SPDX-FileCopyrightText: 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors
Zack Williamsbe542312022-06-23 21:51:32 -07003# SPDX-License-Identifier: Apache-2.0
4
Zack Williamsbe2f86f2019-09-30 22:39:13 -07005# sync built directory to a remote server
6
7- job-template:
8 id: sync-dir
9 name: "sync-dir_{project}"
10 description: |
11 Created by {id} job-template from ci-management/jjb/templates/sync-dir.yaml
12 After merge run a build step then upload files to a directory remote server.
13
14 parameters:
15 - string:
16 name: BUILD_COMMAND
17 default: '{build-command}'
18 description: 'Name of the command to run to generate artifacts'
19
20 - string:
21 name: BUILD_OUTPUT_PATH
22 default: '{build-output-path}'
Zack Williamsbe542312022-06-23 21:51:32 -070023 description: >-
24 Path of files where build output is created by build command, relative to code checkout location
Zack Williamsbe2f86f2019-09-30 22:39:13 -070025
26 - string:
27 name: SYNC_TARGET_SERVER
28 default: '{sync-target-server}'
29 description: 'Name of server where built files will be synced'
30
31 - string:
32 name: SYNC_TARGET_PATH
33 default: '{sync-target-path}'
34 description: 'Directory path on target server where the files will be synced'
35
36 triggers:
Zack Williamsbe542312022-06-23 21:51:32 -070037 - onf-infra-gerrit-trigger-merge:
Zack Williamsbe2f86f2019-09-30 22:39:13 -070038 gerrit-server-name: '{gerrit-server-name}'
39 project-regexp: '^{project}$'
40 branch-regexp: '{branch-regexp}'
41 file-include-regexp: '{all-files-regexp}'
42 dependency-jobs: '{dependency-jobs}'
43
44 properties:
Zack Williamsbe542312022-06-23 21:51:32 -070045 - onf-infra-properties:
Zack Williamsbe2f86f2019-09-30 22:39:13 -070046 build-days-to-keep: '{build-days-to-keep}'
47 artifact-num-to-keep: '{artifact-num-to-keep}'
48
49 wrappers:
50 - onf-infra-rsync-wrappers:
51 build-timeout: '{build-timeout}'
Zack Williamsbe542312022-06-23 21:51:32 -070052 ssh_credential_list:
53 - 'new-cord-jenkins-ssh'
Zack Williamsbe2f86f2019-09-30 22:39:13 -070054
55 scm:
Zack Williamsbe542312022-06-23 21:51:32 -070056 - onf-infra-gerrit-scm:
57 git-url: '{gerrit-server-ssh-url}/$GERRIT_PROJECT'
Zack Williamsbe2f86f2019-09-30 22:39:13 -070058 refspec: '$GERRIT_REFSPEC'
59 branch: '$GERRIT_BRANCH'
Zack Williamsccc14742020-01-22 13:15:59 -070060 submodule-disable: '{submodule-disable}'
Zack Williamsbe2f86f2019-09-30 22:39:13 -070061 submodule-recursive: 'false'
Zack Williamsccc14742020-01-22 13:15:59 -070062 submodule-timeout: '{submodule-timeout}'
Zack Williamsbe2f86f2019-09-30 22:39:13 -070063 choosing-strategy: gerrit
Zack Williamsbe542312022-06-23 21:51:32 -070064 jenkins-ssh-credential: '{jenkins-ssh-credential}'
65 basedir: ''
Zack Williamsbe2f86f2019-09-30 22:39:13 -070066
67 node: '{build-node}'
68 project-type: freestyle
69 concurrent: true
70
71 builders:
Zack Williamsbe542312022-06-23 21:51:32 -070072 - shell: !include-raw-escape: jjb/shell/sync-dir.sh
Zack Williamsbe2f86f2019-09-30 22:39:13 -070073
Joey Armstrongaf679da2023-01-31 14:22:41 -050074
75# [EOF]