7 name: lf-infra-wss-mvn-clean-install
10 condition-kind: boolean-expression
11 condition-expression: "{mvn-clean-install}"
14 maven-version: "{mvn-version}"
16 goals: "clean install"
17 settings: "{mvn-settings}"
19 global-settings: "global-settings"
20 global-settings-type: cfp
23 name: lf-infra-wss-unified-agent-scan
25 - config-file-provider:
27 - file-id: wss-unified-agent.config
28 target: $WORKSPACE/wss-unified-agent.config
29 - shell: !include-raw:
30 - ../shell/whitesource-unified-agent-cli.sh
36 - lf_whitesource_common: &lf_whitesource_common
37 name: lf-whitesource-common
39 ######################
40 # Default parameters #
41 ######################
50 project-type: freestyle
54 - lf-infra-properties:
55 build-days-to-keep: "{build-days-to-keep}"
58 - lf-infra-parameters:
65 build-timeout: "{build-timeout}"
66 jenkins-ssh-credential: "{jenkins-ssh-credential}"
67 - credentials-binding:
69 credential-id: wss-apiKey
75 ##################################
76 # WHITESOURCE UNIFIED AGENT SCAN #
77 ##################################
79 - lf_wss_unified_agent_scan: &lf_wss_unified_agent_scan
80 name: lf-wss-unified-agent-scan
82 ######################
83 # Default parameters #
84 ######################
87 build-days-to-keep: 30
91 git-url: "$GIT_URL/$PROJECT"
92 github-url: "https://github.com"
93 java-version: openjdk8
94 mvn-clean-install: false
95 mvn-global-settings: global-settings
99 submodule-recursive: true
100 submodule-timeout: 10
101 submodule-disable: false
102 wss-unified-agent-opts: ""
103 wss-unified-agent-version: 19.8.1
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: '^Patch Set\s+\d+:\s+(run-whitesource)\s*$'
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 submodule-disable: "{submodule-disable}"
180 choosing-strategy: default
183 # Build weekly on Saturdays
184 - timed: "{obj:cron}"
186 server-name: "{gerrit-server-name}"
187 trigger-on: "{obj:gerrit_wss_triggers}"
189 - project-compare-type: ANT
190 project-pattern: "{project}"
192 - branch-compare-type: ANT
193 branch-pattern: "**/{branch}"
194 file-paths: "{obj:gerrit_trigger_file_paths}"
202 name: "{project-name}-whitesource-scan-{stream}"
203 id: github-whitesource-scan
204 <<: *lf_whitesource_common
205 # yamllint disable-line rule:key-duplicates
206 <<: *lf_wss_unified_agent_scan
209 - lf-infra-properties:
210 build-days-to-keep: "{build-days-to-keep}"
212 url: "{github-url}/{github-org}/{project}"
215 - lf-infra-github-scm:
216 url: "{git-clone-url}{github-org}/{project}"
218 branch: "refs/heads/{branch}"
219 submodule-recursive: "{submodule-recursive}"
220 submodule-timeout: "{submodule-timeout}"
221 submodule-disable: "{submodule-disable}"
222 choosing-strategy: default
223 jenkins-ssh-credential: "{jenkins-ssh-credential}"
226 # Build weekly on Saturdays
227 - timed: "{obj:cron}"
228 - github-pull-request:
229 trigger-phrase: "^run-whitesource$"
230 only-trigger-phrase: false
231 status-context: "WhiteSource"
234 white-list-target-branches:
236 included-regions: "{obj:github_included_regions}"