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/target"
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 packagecloud-account: "{packagecloud-account}"
103 packagecloud-repo: "{packagecloud-repo}"
104 debian-distribution-versions: "{debian-distribution-versions}"
105 rpm-distribution-versions: "{rpm-distribution-versions}"
108 # build with cmake and publish to PackageCloud on command
109 name: "{project-name}-cmake-pc-stage-{stream}"
110 id: oran-gerrit-cmake-pc-stage
111 <<: *oran_cmake_common
112 <<: *oran_cmake_pc_stage
114 ######################
115 # Default parameters #
116 ######################
118 gerrit_stage_triggers:
119 - comment-added-contains-event:
120 comment-contains-value: '^Patch Set\s+\d+:\s+stage-release\s*$'
122 #####################
123 # Job Configuration #
124 #####################
127 - lf-infra-gerrit-scm:
128 jenkins-ssh-credential: "{jenkins-ssh-credential}"
130 refspec: "$GERRIT_REFSPEC"
131 branch: "$GERRIT_BRANCH"
132 submodule-recursive: "{submodule-recursive}"
133 submodule-timeout: "{submodule-timeout}"
134 submodule-disable: "{submodule-disable}"
135 # stage jobs always build from tip
136 choosing-strategy: default
139 - timed: "{obj:cron}"
141 server-name: "{gerrit-server-name}"
142 trigger-on: "{obj:gerrit_stage_triggers}"
144 - project-compare-type: ANT
145 project-pattern: "{project}"
147 - branch-compare-type: ANT
148 branch-pattern: "**/{branch}"
149 file-paths: "{obj:gerrit_trigger_file_paths}"