8 name: lf-infra-wss-mvn-clean-install
11 condition-kind: boolean-expression
12 condition-expression: '{mvn-clean-install}'
15 maven-version: '{mvn-version}'
17 goals: 'clean install'
18 settings: '{mvn-settings}'
20 global-settings: 'global-settings'
21 global-settings-type: cfp
24 name: lf-infra-wss-unified-agent-scan
26 - config-file-provider:
28 - file-id: wss-unified-agent.config
29 target: $WORKSPACE/wss-unified-agent.config
30 - shell: !include-raw:
31 - ../shell/whitesource-unified-agent-cli.sh
37 - lf_whitesource_common: &lf_whitesource_common
38 name: lf-whitesource-common
40 ######################
41 # Default parameters #
42 ######################
51 project-type: freestyle
55 - lf-infra-properties:
56 build-days-to-keep: '{build-days-to-keep}'
59 - lf-infra-parameters:
66 build-timeout: '{build-timeout}'
67 jenkins-ssh-credential: '{jenkins-ssh-credential}'
68 - credentials-binding:
70 credential-id: wss-apiKey
76 ##################################
77 # WHITESOURCE UNIFIED AGENT SCAN #
78 ##################################
80 - lf_wss_unified_agent_scan: &lf_wss_unified_agent_scan
81 name: lf-wss-unified-agent-scan
83 ######################
84 # Default parameters #
85 ######################
88 build-days-to-keep: 30
92 git-url: '$GIT_URL/$PROJECT'
93 github-url: 'https://github.com'
94 java-version: openjdk8
95 mvn-clean-install: false
96 mvn-global-settings: global-settings
100 submodule-recursive: true
101 submodule-timeout: 10
102 submodule-disable: false
103 wss-unified-agent-opts: ''
104 wss-unified-agent-version: 19.2.2.2
106 gerrit_trigger_file_paths:
110 # github_included_regions MUST match gerrit_trigger_file_paths
111 github_included_regions:
114 #####################
115 # Job Configuration #
116 #####################
118 disabled: '{disable-job}'
121 - lf-infra-parameters:
126 name: WSS_PROJECT_NAME
127 default: '{project-name}'
128 description: Project to asociate the WhiteSource report in the dashboard.
130 name: WSS_PRODUCT_NAME
131 default: '{wss-product-name}'
132 description: Product to asociate the WhiteSource report in the dashboard.
134 name: WSS_UNIFIED_AGENT_OPTIONS
135 default: '{wss-unified-agent-opts}'
136 description: Options to pass to the WhiteSource Unified Agent CLI.
138 name: WSS_UNIFIED_AGENT_VERSION
139 default: '{wss-unified-agent-version}'
140 description: WhiteSource Unified Agent version package to download and use.
144 - lf-update-java-alternatives:
145 java-version: '{java-version}'
146 - lf-infra-wss-mvn-clean-install:
147 mvn-clean-install: '{mvn-clean-install}'
148 mvn-version: '{mvn-version}'
150 mvn-settings: '{mvn-settings}'
151 - lf-infra-wss-unified-agent-scan
154 name: '{project-name}-whitesource-scan-{stream}'
155 id: gerrit-whitesource-scan
156 <<: *lf_whitesource_common
157 # yamllint disable-line rule:key-duplicates
158 <<: *lf_wss_unified_agent_scan
160 ######################
161 # Default parameters #
162 ######################
165 - comment-added-contains-event:
166 comment-contains-value: '^Patch Set\s+\d+:\s+(run-whitesource)\s*$'
168 #####################
169 # Job Configuration #
170 #####################
173 - lf-infra-gerrit-scm:
174 jenkins-ssh-credential: '{jenkins-ssh-credential}'
176 refspec: '$GERRIT_REFSPEC'
177 branch: '$GERRIT_BRANCH'
178 submodule-recursive: '{submodule-recursive}'
179 submodule-timeout: '{submodule-timeout}'
180 submodule-disable: '{submodule-disable}'
181 choosing-strategy: default
184 # Build weekly on Saturdays
185 - timed: '{obj:cron}'
187 server-name: '{gerrit-server-name}'
188 trigger-on: '{obj:gerrit_wss_triggers}'
190 - project-compare-type: ANT
191 project-pattern: '{project}'
193 - branch-compare-type: ANT
194 branch-pattern: '**/{branch}'
195 file-paths: '{obj:gerrit_trigger_file_paths}'
203 name: '{project-name}-whitesource-scan-{stream}'
204 id: github-whitesource-scan
205 <<: *lf_whitesource_common
206 # yamllint disable-line rule:key-duplicates
207 <<: *lf_wss_unified_agent_scan
210 - lf-infra-properties:
211 build-days-to-keep: '{build-days-to-keep}'
213 url: '{github-url}/{github-org}/{project}'
216 - lf-infra-github-scm:
217 url: '{git-clone-url}{github-org}/{project}'
219 branch: 'refs/heads/{branch}'
220 submodule-recursive: '{submodule-recursive}'
221 submodule-timeout: '{submodule-timeout}'
222 submodule-disable: '{submodule-disable}'
223 choosing-strategy: default
224 jenkins-ssh-credential: '{jenkins-ssh-credential}'
227 # Build weekly on Saturdays
228 - timed: '{obj:cron}'
229 - github-pull-request:
230 trigger-phrase: '^run-whitesource$'
231 only-trigger-phrase: false
232 status-context: 'WhiteSource'
235 white-list-target-branches:
237 included-regions: '{obj:github_included_regions}'