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 - shell: !include-raw:
32 - ../shell/whitesource-unified-agent-cli.sh
38 - lf_whitesource_common: &lf_whitesource_common
39 name: lf-whitesource-common
41 ######################
42 # Default parameters #
43 ######################
52 project-type: freestyle
56 - lf-infra-properties:
57 build-days-to-keep: "{build-days-to-keep}"
60 - lf-infra-parameters:
67 build-timeout: "{build-timeout}"
68 jenkins-ssh-credential: "{jenkins-ssh-credential}"
69 - credentials-binding:
71 credential-id: wss-apiKey
77 ##################################
78 # WHITESOURCE UNIFIED AGENT SCAN #
79 ##################################
81 - lf_wss_unified_agent_scan: &lf_wss_unified_agent_scan
82 name: lf-wss-unified-agent-scan
84 ######################
85 # Default parameters #
86 ######################
89 build-days-to-keep: 30
93 git-url: "$GIT_URL/$PROJECT"
94 github-url: "https://github.com"
96 java-version: openjdk8
97 mvn-clean-install: false
98 mvn-global-settings: global-settings
102 submodule-recursive: true
103 submodule-timeout: 10
104 submodule-disable: false
105 wss-unified-agent-opts: ""
106 wss-unified-agent-version: 19.8.1
108 gerrit_trigger_file_paths:
112 # github_included_regions MUST match gerrit_trigger_file_paths
113 github_included_regions:
116 #####################
117 # Job Configuration #
118 #####################
120 disabled: "{disable-job}"
123 - lf-infra-parameters:
128 name: WSS_PROJECT_NAME
129 default: "{project-name}"
130 description: Project to asociate the WhiteSource report in the dashboard.
132 name: WSS_PRODUCT_NAME
133 default: "{wss-product-name}"
134 description: Product to asociate the WhiteSource report in the dashboard.
136 name: WSS_UNIFIED_AGENT_OPTIONS
137 default: "{wss-unified-agent-opts}"
138 description: Options to pass to the WhiteSource Unified Agent CLI.
140 name: WSS_UNIFIED_AGENT_VERSION
141 default: "{wss-unified-agent-version}"
142 description: WhiteSource Unified Agent version package to download and use.
146 - lf-update-java-alternatives:
147 java-version: "{java-version}"
148 - lf-infra-wss-mvn-clean-install:
149 java-opts: "{java-opts}"
150 mvn-clean-install: "{mvn-clean-install}"
151 mvn-version: "{mvn-version}"
153 mvn-settings: "{mvn-settings}"
154 - lf-infra-wss-unified-agent-scan
157 name: "{project-name}-whitesource-scan-{stream}"
158 id: gerrit-whitesource-scan
159 <<: *lf_whitesource_common
160 # yamllint disable-line rule:key-duplicates
161 <<: *lf_wss_unified_agent_scan
163 ######################
164 # Default parameters #
165 ######################
168 - comment-added-contains-event:
169 comment-contains-value: '^Patch Set\s+\d+:\s+(run-whitesource)\s*$'
171 #####################
172 # Job Configuration #
173 #####################
176 - lf-infra-gerrit-scm:
177 jenkins-ssh-credential: "{jenkins-ssh-credential}"
179 refspec: "$GERRIT_REFSPEC"
180 branch: "$GERRIT_BRANCH"
181 submodule-recursive: "{submodule-recursive}"
182 submodule-timeout: "{submodule-timeout}"
183 submodule-disable: "{submodule-disable}"
184 choosing-strategy: default
187 # Build weekly on Saturdays
188 - timed: "{obj:cron}"
190 server-name: "{gerrit-server-name}"
191 trigger-on: "{obj:gerrit_wss_triggers}"
193 - project-compare-type: ANT
194 project-pattern: "{project}"
196 - branch-compare-type: ANT
197 branch-pattern: "**/{branch}"
198 file-paths: "{obj:gerrit_trigger_file_paths}"
206 name: "{project-name}-whitesource-scan-{stream}"
207 id: github-whitesource-scan
208 <<: *lf_whitesource_common
209 # yamllint disable-line rule:key-duplicates
210 <<: *lf_wss_unified_agent_scan
213 - lf-infra-properties:
214 build-days-to-keep: "{build-days-to-keep}"
216 url: "{github-url}/{github-org}/{project}"
219 - lf-infra-github-scm:
220 url: "{git-clone-url}{github-org}/{project}"
222 branch: "refs/heads/{branch}"
223 submodule-recursive: "{submodule-recursive}"
224 submodule-timeout: "{submodule-timeout}"
225 submodule-disable: "{submodule-disable}"
226 choosing-strategy: default
227 jenkins-ssh-credential: "{jenkins-ssh-credential}"
230 # Build weekly on Saturdays
231 - timed: "{obj:cron}"
232 - github-pull-request:
233 trigger-phrase: "^run-whitesource$"
234 only-trigger-phrase: false
235 status-context: "WhiteSource"
238 white-list-target-branches:
240 included-regions: "{obj:github_included_regions}"