1 # Copyright (c) 2020 AT&T Intellectual Property.
3 # Licensed under the Apache License, Version 2.0 (the 'License');
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an 'AS IS' BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 # This file is structured with a cmake alias/anchor, an alias/anchor,
17 # and a job-template to simplify the task of lifting it to global-jjb.
23 # Clone of lf_cmake_common which isn't visible here
24 - oran_cmake_common: &oran_cmake_common
25 name: oran-cmake-common
31 project-type: freestyle
33 disabled: "{disable-job}"
36 - lf-infra-properties:
37 build-days-to-keep: "{build-days-to-keep}"
40 - lf-infra-parameters:
44 - lf-cmake-parameters:
45 build-dir: "{build-dir}"
46 cmake-opts: "{cmake-opts}"
47 install-prefix: "{install-prefix}"
48 make-opts: "{make-opts}"
52 build-timeout: "{build-timeout}"
53 jenkins-ssh-credential: "{jenkins-ssh-credential}"
62 - oran_cmake_pc_stage: &oran_cmake_pc_stage
63 name: oran-cmake-pc-stage
65 ######################
66 # Default parameters #
67 ######################
71 build-dir: "$WORKSPACE/build"
74 cron: "" # avoid for PackageCloud which rejects duplicates
76 git-url: "$GIT_URL/$PROJECT"
77 github-url: "https://github.com"
78 install-prefix: "$BUILD_DIR/output"
82 submodule-recursive: true
84 submodule-disable: false
86 gerrit_trigger_file_paths:
87 - compare-type: REG_EXP
90 # github_included_regions MUST match gerrit_trigger_file_paths
91 github_included_regions:
95 - config-file-provider:
97 - file-id: ".packagecloud"
98 target: "$HOME/.packagecloud"
99 - shell: "{pre-build}"
100 - shell: !include-raw-escape: ../../global-jjb/shell/cmake-build.sh
101 - oran-packagecloud-push:
102 build-dir: "{build-dir}"
103 packagecloud-account: "{packagecloud-account}"
104 packagecloud-repo: "{packagecloud-repo}"
105 debian-distribution-versions: "{debian-distribution-versions}"
106 rpm-distribution-versions: "{rpm-distribution-versions}"
109 # build with cmake and publish to PackageCloud on command
110 name: "{project-name}-cmake-pc-stage-{stream}"
111 id: oran-gerrit-cmake-pc-stage
112 <<: *oran_cmake_common
113 <<: *oran_cmake_pc_stage
115 ######################
116 # Default parameters #
117 ######################
119 gerrit_stage_triggers:
120 - comment-added-contains-event:
121 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
123 #####################
124 # Job Configuration #
125 #####################
128 - lf-infra-gerrit-scm:
129 jenkins-ssh-credential: "{jenkins-ssh-credential}"
131 refspec: "$GERRIT_REFSPEC"
132 branch: "$GERRIT_BRANCH"
133 submodule-recursive: "{submodule-recursive}"
134 submodule-timeout: "{submodule-timeout}"
135 submodule-disable: "{submodule-disable}"
136 # stage jobs always build from tip
137 choosing-strategy: default
140 - timed: "{obj:cron}"
142 server-name: "{gerrit-server-name}"
143 trigger-on: "{obj:gerrit_stage_triggers}"
145 - project-compare-type: ANT
146 project-pattern: "{project}"
148 - branch-compare-type: ANT
149 branch-pattern: "**/{branch}"
150 file-paths: "{obj:gerrit_trigger_file_paths}"