7 name: lf-infra-wss-mvn-clean-install
10 properties-content: JAVA_OPTS={java-opts}
12 condition-kind: boolean-expression
13 condition-expression: "{mvn-clean-install}"
16 maven-version: "{mvn-version}"
18 goals: "clean install"
19 settings: "{mvn-settings}"
21 global-settings: "global-settings"
22 global-settings-type: cfp
25 name: lf-infra-wss-unified-agent-scan
27 - config-file-provider:
29 - file-id: wss-unified-agent.config
30 target: $WORKSPACE/wss-unified-agent.config
31 - file-id: global-settings
32 target: $WORKSPACE/global-settings.xml
33 - shell: !include-raw:
34 - ../shell/whitesource-unified-agent-cli.sh
40 - lf_whitesource_common: &lf_whitesource_common
41 name: lf-whitesource-common
43 ######################
44 # Default parameters #
45 ######################
54 project-type: freestyle
58 - lf-infra-properties:
59 build-days-to-keep: "{build-days-to-keep}"
62 - lf-infra-parameters:
69 build-timeout: "{build-timeout}"
70 jenkins-ssh-credential: "{jenkins-ssh-credential}"
71 - credentials-binding:
73 credential-id: wss-apiKey
79 ##################################
80 # WHITESOURCE UNIFIED AGENT SCAN #
81 ##################################
83 - lf_wss_unified_agent_scan: &lf_wss_unified_agent_scan
84 name: lf-wss-unified-agent-scan
86 ######################
87 # Default parameters #
88 ######################
91 build-days-to-keep: 30
95 git-url: "$GIT_URL/$PROJECT"
96 github-url: "https://github.com"
98 java-version: openjdk11
99 mvn-clean-install: false
100 mvn-global-settings: global-settings
104 submodule-recursive: true
105 submodule-timeout: 10
106 submodule-disable: false
107 wss-unified-agent-opts: ""
108 wss-unified-agent-version: 21.2.1
110 gerrit_trigger_file_paths:
114 # github_included_regions MUST match gerrit_trigger_file_paths
115 github_included_regions:
118 #####################
119 # Job Configuration #
120 #####################
122 disabled: "{disable-job}"
125 - lf-infra-parameters:
130 name: WSS_PROJECT_NAME
131 default: "{project-name}"
132 description: Project to asociate the WhiteSource report in the dashboard.
134 name: WSS_PRODUCT_NAME
135 default: "{wss-product-name}"
136 description: Product to asociate the WhiteSource report in the dashboard.
138 name: WSS_UNIFIED_AGENT_OPTIONS
139 default: "{wss-unified-agent-opts}"
140 description: Options to pass to the WhiteSource Unified Agent CLI.
142 name: WSS_UNIFIED_AGENT_VERSION
143 default: "{wss-unified-agent-version}"
144 description: WhiteSource Unified Agent version package to download and use.
148 - lf-update-java-alternatives:
149 java-version: "{java-version}"
150 - lf-infra-wss-mvn-clean-install:
151 java-opts: "{java-opts}"
152 mvn-clean-install: "{mvn-clean-install}"
153 mvn-version: "{mvn-version}"
155 mvn-settings: "{mvn-settings}"
156 - lf-infra-wss-unified-agent-scan
159 name: "{project-name}-whitesource-scan-{stream}"
160 id: gerrit-whitesource-scan
161 <<: *lf_whitesource_common
162 # yamllint disable-line rule:key-duplicates
163 <<: *lf_wss_unified_agent_scan
165 ######################
166 # Default parameters #
167 ######################
170 - comment-added-contains-event:
171 comment-contains-value: '^Patch Set\s+\d+:\s+(run-whitesource)\s*$'
173 #####################
174 # Job Configuration #
175 #####################
178 - lf-infra-gerrit-scm:
179 jenkins-ssh-credential: "{jenkins-ssh-credential}"
181 refspec: "$GERRIT_REFSPEC"
182 branch: "$GERRIT_BRANCH"
183 submodule-recursive: "{submodule-recursive}"
184 submodule-timeout: "{submodule-timeout}"
185 submodule-disable: "{submodule-disable}"
186 choosing-strategy: default
189 # Build weekly on Saturdays
190 - timed: "{obj:cron}"
192 server-name: "{gerrit-server-name}"
193 trigger-on: "{obj:gerrit_wss_triggers}"
195 - project-compare-type: ANT
196 project-pattern: "{project}"
198 - branch-compare-type: ANT
199 branch-pattern: "**/{branch}"
200 file-paths: "{obj:gerrit_trigger_file_paths}"
208 name: "{project-name}-whitesource-scan-{stream}"
209 id: github-whitesource-scan
210 <<: *lf_whitesource_common
211 # yamllint disable-line rule:key-duplicates
212 <<: *lf_wss_unified_agent_scan
215 - lf-infra-properties:
216 build-days-to-keep: "{build-days-to-keep}"
218 url: "{github-url}/{github-org}/{project}"
221 - lf-infra-github-scm:
222 url: "{git-clone-url}{github-org}/{project}"
224 branch: "refs/heads/{branch}"
225 submodule-recursive: "{submodule-recursive}"
226 submodule-timeout: "{submodule-timeout}"
227 submodule-disable: "{submodule-disable}"
228 choosing-strategy: default
229 jenkins-ssh-credential: "{jenkins-ssh-credential}"
232 # Build weekly on Saturdays
233 - timed: "{obj:cron}"
234 - github-pull-request:
235 trigger-phrase: "^run-whitesource$"
236 only-trigger-phrase: false
237 status-context: "WhiteSource"
240 white-list-target-branches:
242 included-regions: "{obj:github_included_regions}"