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 wss-unified-agent-opts: ''
103 wss-unified-agent-version: 19.2.2.2
105 gerrit_trigger_file_paths:
109 # github_included_regions MUST match gerrit_trigger_file_paths
110 github_included_regions:
113 #####################
114 # Job Configuration #
115 #####################
117 disabled: '{disable-job}'
120 - lf-infra-parameters:
125 name: WSS_PROJECT_NAME
126 default: '{project-name}'
127 description: Project to asociate the WhiteSource report in the dashboard.
129 name: WSS_PRODUCT_NAME
130 default: '{wss-product-name}'
131 description: Product to asociate the WhiteSource report in the dashboard.
133 name: WSS_UNIFIED_AGENT_OPTIONS
134 default: '{wss-unified-agent-opts}'
135 description: Options to pass to the WhiteSource Unified Agent CLI.
137 name: WSS_UNIFIED_AGENT_VERSION
138 default: '{wss-unified-agent-version}'
139 description: WhiteSource Unified Agent version package to download and use.
143 - lf-update-java-alternatives:
144 java-version: '{java-version}'
145 - lf-infra-wss-mvn-clean-install:
146 mvn-clean-install: '{mvn-clean-install}'
147 mvn-version: '{mvn-version}'
149 mvn-settings: '{mvn-settings}'
150 - lf-infra-wss-unified-agent-scan
153 name: '{project-name}-whitesource-scan-{stream}'
154 id: gerrit-whitesource-scan
155 <<: *lf_whitesource_common
156 # yamllint disable-line rule:key-duplicates
157 <<: *lf_wss_unified_agent_scan
159 ######################
160 # Default parameters #
161 ######################
164 - comment-added-contains-event:
165 comment-contains-value: run-whitesource$
167 #####################
168 # Job Configuration #
169 #####################
172 - lf-infra-gerrit-scm:
173 jenkins-ssh-credential: '{jenkins-ssh-credential}'
175 refspec: '$GERRIT_REFSPEC'
176 branch: '$GERRIT_BRANCH'
177 submodule-recursive: '{submodule-recursive}'
178 submodule-timeout: '{submodule-timeout}'
179 choosing-strategy: default
182 # Build weekly on Saturdays
183 - timed: '{obj:cron}'
185 server-name: '{gerrit-server-name}'
186 trigger-on: '{obj:gerrit_wss_triggers}'
188 - project-compare-type: ANT
189 project-pattern: '{project}'
191 - branch-compare-type: ANT
192 branch-pattern: '**/{branch}'
193 file-paths: '{obj:gerrit_trigger_file_paths}'
201 name: '{project-name}-whitesource-scan-{stream}'
202 id: github-whitesource-scan
203 <<: *lf_whitesource_common
204 # yamllint disable-line rule:key-duplicates
205 <<: *lf_wss_unified_agent_scan
208 - lf-infra-properties:
209 build-days-to-keep: '{build-days-to-keep}'
211 url: '{github-url}/{github-org}/{project}'
214 - lf-infra-github-scm:
215 url: '{git-clone-url}{github-org}/{project}'
217 branch: 'refs/heads/{branch}'
218 submodule-recursive: '{submodule-recursive}'
219 submodule-timeout: '{submodule-timeout}'
220 choosing-strategy: default
221 jenkins-ssh-credential: '{jenkins-ssh-credential}'
224 # Build weekly on Saturdays
225 - timed: '{obj:cron}'
226 - github-pull-request:
227 trigger-phrase: '^run-whitesource$'
228 only-trigger-phrase: false
229 status-context: 'WhiteSource'
232 white-list-target-branches:
234 included-regions: '{obj:github_included_regions}'