@@ -195,132 +195,133 @@ stages:
195
195
- checkout : templates
196
196
197
197
- bash : |
198
- echo "$(source_branch_ref)"
199
- echo "$(target_branch_ref)"
200
- echo "$(pullrequest_number)"
198
+ echo Reason: $(Build.Reason)
199
+ echo source branch: "$(source_branch_ref)"
200
+ echo target branch: "$(target_branch_ref)"
201
+ echo pull request number: "$(pullrequest_number)"
201
202
202
203
exit 1
203
204
displayName: Debug Vars Test
204
205
205
- # Updates the build number in Azure DevOps (requires refresh in the UI to see)
206
- - bash : |
207
- echo '##vso[Build.UpdateBuildNumber]${{ variables.docker_image_tag }}'
208
- displayName: 'Update: Build Number'
209
-
210
- # Validates all YAML files in the repo to check they adhere to standards
211
- - template : templates/steps/build/test-validate-yaml.yml
212
- parameters :
213
- pipeline_scripts_directory : " ${{ variables.self_pipeline_scripts_dir }}"
214
- container : " k8s_deploy"
215
- yamllint_config_file : " ${{ variables.yamllint_config_file }}"
216
- yamllint_scan_directory : " ${{ variables.yamllint_scan_directory }}"
217
-
218
- # Runs a terraform formatting check and a validation check
219
- - template : templates/steps/build/test-validate-terraform.yml
220
- parameters :
221
- pipeline_scripts_directory : " ${{ variables.self_pipeline_scripts_dir }}"
222
- terraform_container : " terraform_custom"
223
- terraform_directory : " ${{ variables.self_repo_tf_dir }}"
224
-
225
- # Builds the Java app and runs tests
226
- - template : templates/steps/build/build-java.yml
227
- parameters :
228
- repo_root_dir : " ${{ variables.self_repo_dir }}"
229
- project_root_dir : " ${{ variables.self_project_dir }}"
230
- pipeline_scripts_directory : " ${{ variables.self_pipeline_scripts_dir }}"
231
- # Maven
232
- maven_cache_directory : " ${{ variables.maven_cache_directory }}"
233
- maven_surefire_reports_dir : " ${{ variables.maven_surefire_reports_dir }}"
234
- maven_allowed_test_tags : " ${{ variables.maven_allowed_test_tags}}"
235
- # Docker
236
- docker_build_container : " ${{ variables.docker_java_image }}"
237
- # Vulnerability Scanning
238
- vulnerability_scan : " ${{ variables.vulnerability_scan }}"
239
- vulnerability_scan_api_key : " ${{ variables.vulnerability_scan_api_key }}"
240
- vulnerability_scan_fail_build_on_detection : " ${{ variables.vulnerability_scan_fail_build_on_detection }}"
241
- project_type : " ${{ variables.java_project_type }}"
242
-
243
- # Builds the Java API Tests
244
- - template : templates/steps/build/build-api-tests.yml
245
- parameters :
246
- repo_root_dir : " ${{ variables.self_repo_dir }}"
247
- functional_test_project_root_dir : " ${{ variables.self_functional_testproject_dir }}"
248
- functional_test_artefact_path : " ${{ variables.functional_test_artefact_path }}"
249
- pipeline_scripts_directory : " ${{ variables.self_pipeline_scripts_dir }}"
250
- # Maven
251
- maven_untagged_test_check : true
252
- maven_cache_directory : " ${{ variables.maven_cache_directory }}"
253
- maven_allowed_post_deploy_test_tags : " ${{ variables.maven_allowed_post_deploy_test_tags }}"
254
- maven_ignored_post_deploy_test_tags : " ${{ variables.maven_ignored_post_deploy_test_tags }}"
255
- maven_post_deploy_html_report_directory : " ${{ variables.maven_post_deploy_html_report_directory }}"
256
- maven_post_deploy_failsafe_reports_directory : " ${{ variables.maven_post_deploy_failsafe_reports_directory }}"
257
- # Docker
258
- docker_build_container : " ${{ variables.docker_java_image }}"
259
- # Vulnerability Scan
260
- vulnerability_scan : " ${{ variables.vulnerability_scan }}"
261
- vulnerability_scan_api_key : " ${{ variables.vulnerability_scan_api_key }}"
262
- vulnerability_scan_fail_build_on_detection : " ${{ variables.vulnerability_scan_fail_build_on_detection }}"
263
- project_type : " ${{ variables.functional_test_project_type }}"
264
-
265
- # Performs static code analysis, such as Sonar Cloud
266
- - template : templates/steps/build/test-static-code-analysis.yml
267
- parameters :
268
- project_root_dir : " ${{ variables.self_project_dir }}"
269
- pipeline_scripts_directory : " ${{ variables.self_pipeline_scripts_dir}}"
270
- # PR / Branch vars
271
- source_branch_ref : " $(source_branch_ref)"
272
- target_branch_ref : " $(target_branch_ref)"
273
- pullrequest_number : " $(pullrequest_number)"
274
- # Sonar
275
- sonar_enable : true
276
- # Set to false to speed up validation of deploy stage, revert once done
277
- sonar_container : " sonar_scanner"
278
- sonar_host_url : " https://sonarcloud.io"
279
- sonar_project_name : " $(SONAR_PROJECT_NAME)"
280
- sonar_project_key : " $(SONAR_PROJECT_KEY)"
281
- sonar_token : " $(SONAR_TOKEN)"
282
- sonar_organisation : " $(SONAR_ORGANIZATION)"
283
- # Probably `GitHub` or `vsts`
284
- sonar_pullrequest_provider : " GitHub"
285
- sonar_remote_repo : " ${{ variables.self_remote_repo }}"
286
- sonar_command : " sonar-scanner"
287
- # Docker
288
- docker_image_tag : " ${{ variables.docker_image_tag }}"
289
-
290
- # Builds the Docker image and pushes it to an ACR
291
- - template : templates/steps/build/build-docker-image.yml
292
- parameters :
293
- project_root_dir : " ${{ variables.self_project_dir }}"
294
- pipeline_scripts_directory : " ${{ variables.self_pipeline_scripts_dir }}"
295
- docker_k8s_container : " k8s_deploy"
296
- docker_build_additional_args : " ."
297
- docker_image_name : " ${{ variables.docker_image_name }}"
298
- docker_image_tag : " ${{ variables.docker_image_tag }}"
299
- docker_container_registry_name : " $(DOCKER_USERNAME)"
300
- # Azure
301
- azure_client_id : " $(ARM_CLIENT_ID)"
302
- azure_client_secret : " $(ARM_CLIENT_SECRET)"
303
- azure_tenant_id : " $(ARM_TENANT_ID)"
304
- azure_subscription_id : " $(ARM_SUBSCRIPTION_ID)"
305
-
306
- # Post build tasks, such as Test and Coverage upload, and publishing artefacts
307
- - template : templates/steps/build/post-build-tasks.yml
308
- parameters :
309
- project_root_dir : " ${{ variables.self_project_dir }}"
310
- functional_test_project_root_dir : " ${{ variables.self_functional_testproject_dir }}"
311
- # Build Output File
312
- # files to be persisted across stages
313
- build_file : true
314
- build_file_path : " ${{ variables.build_artifact_deploy_path }}"
315
- build_file_artefact_name : " ${{ variables.build_artifact_deploy_name }}"
316
- # Functional tests
317
- functional_test : ${{ variables.functional_test }}
318
- functional_test_artefact_name : " ${{ variables.functional_test_artefact_name }}"
319
- functional_test_artefact_path : " ${{ variables.functional_test_artefact_path }}"
320
- vulnerability_scan : " ${{ variables.vulnerability_scan }}"
321
- vulnerability_scan_report : " ${{ variables.vulnerability_scan_report }}"
322
- java_project_type : " ${{ variables.java_project_type }}"
323
- functional_test_project_type : " ${{ variables.functional_test_project_type }}"
206
+ # # Updates the build number in Azure DevOps (requires refresh in the UI to see)
207
+ # - bash: |
208
+ # echo '##vso[Build.UpdateBuildNumber]${{ variables.docker_image_tag }}'
209
+ # displayName: 'Update: Build Number'
210
+
211
+ # # Validates all YAML files in the repo to check they adhere to standards
212
+ # - template: templates/steps/build/test-validate-yaml.yml
213
+ # parameters:
214
+ # pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
215
+ # container: "k8s_deploy"
216
+ # yamllint_config_file: "${{ variables.yamllint_config_file }}"
217
+ # yamllint_scan_directory: "${{ variables.yamllint_scan_directory }}"
218
+
219
+ # # Runs a terraform formatting check and a validation check
220
+ # - template: templates/steps/build/test-validate-terraform.yml
221
+ # parameters:
222
+ # pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
223
+ # terraform_container: "terraform_custom"
224
+ # terraform_directory: "${{ variables.self_repo_tf_dir }}"
225
+
226
+ # # Builds the Java app and runs tests
227
+ # - template: templates/steps/build/build-java.yml
228
+ # parameters:
229
+ # repo_root_dir: "${{ variables.self_repo_dir }}"
230
+ # project_root_dir: "${{ variables.self_project_dir }}"
231
+ # pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
232
+ # # Maven
233
+ # maven_cache_directory: "${{ variables.maven_cache_directory }}"
234
+ # maven_surefire_reports_dir: "${{ variables.maven_surefire_reports_dir }}"
235
+ # maven_allowed_test_tags: "${{ variables.maven_allowed_test_tags}}"
236
+ # # Docker
237
+ # docker_build_container: "${{ variables.docker_java_image }}"
238
+ # # Vulnerability Scanning
239
+ # vulnerability_scan: "${{ variables.vulnerability_scan }}"
240
+ # vulnerability_scan_api_key: "${{ variables.vulnerability_scan_api_key }}"
241
+ # vulnerability_scan_fail_build_on_detection: "${{ variables.vulnerability_scan_fail_build_on_detection }}"
242
+ # project_type: "${{ variables.java_project_type }}"
243
+
244
+ # # Builds the Java API Tests
245
+ # - template: templates/steps/build/build-api-tests.yml
246
+ # parameters:
247
+ # repo_root_dir: "${{ variables.self_repo_dir }}"
248
+ # functional_test_project_root_dir: "${{ variables.self_functional_testproject_dir }}"
249
+ # functional_test_artefact_path: "${{ variables.functional_test_artefact_path }}"
250
+ # pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
251
+ # # Maven
252
+ # maven_untagged_test_check: true
253
+ # maven_cache_directory: "${{ variables.maven_cache_directory }}"
254
+ # maven_allowed_post_deploy_test_tags: "${{ variables.maven_allowed_post_deploy_test_tags }}"
255
+ # maven_ignored_post_deploy_test_tags: "${{ variables.maven_ignored_post_deploy_test_tags }}"
256
+ # maven_post_deploy_html_report_directory: "${{ variables.maven_post_deploy_html_report_directory }}"
257
+ # maven_post_deploy_failsafe_reports_directory: "${{ variables.maven_post_deploy_failsafe_reports_directory }}"
258
+ # # Docker
259
+ # docker_build_container: "${{ variables.docker_java_image }}"
260
+ # # Vulnerability Scan
261
+ # vulnerability_scan: "${{ variables.vulnerability_scan }}"
262
+ # vulnerability_scan_api_key: "${{ variables.vulnerability_scan_api_key }}"
263
+ # vulnerability_scan_fail_build_on_detection: "${{ variables.vulnerability_scan_fail_build_on_detection }}"
264
+ # project_type: "${{ variables.functional_test_project_type }}"
265
+
266
+ # # Performs static code analysis, such as Sonar Cloud
267
+ # - template: templates/steps/build/test-static-code-analysis.yml
268
+ # parameters:
269
+ # project_root_dir: "${{ variables.self_project_dir }}"
270
+ # pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir}}"
271
+ # # PR / Branch vars
272
+ # source_branch_ref: "$(source_branch_ref)"
273
+ # target_branch_ref: "$(target_branch_ref)"
274
+ # pullrequest_number: "$(pullrequest_number)"
275
+ # # Sonar
276
+ # sonar_enable: true
277
+ # # Set to false to speed up validation of deploy stage, revert once done
278
+ # sonar_container: "sonar_scanner"
279
+ # sonar_host_url: "https://sonarcloud.io"
280
+ # sonar_project_name: "$(SONAR_PROJECT_NAME)"
281
+ # sonar_project_key: "$(SONAR_PROJECT_KEY)"
282
+ # sonar_token: "$(SONAR_TOKEN)"
283
+ # sonar_organisation: "$(SONAR_ORGANIZATION)"
284
+ # # Probably `GitHub` or `vsts`
285
+ # sonar_pullrequest_provider: "GitHub"
286
+ # sonar_remote_repo: "${{ variables.self_remote_repo }}"
287
+ # sonar_command: "sonar-scanner"
288
+ # # Docker
289
+ # docker_image_tag: "${{ variables.docker_image_tag }}"
290
+
291
+ # # Builds the Docker image and pushes it to an ACR
292
+ # - template: templates/steps/build/build-docker-image.yml
293
+ # parameters:
294
+ # project_root_dir: "${{ variables.self_project_dir }}"
295
+ # pipeline_scripts_directory: "${{ variables.self_pipeline_scripts_dir }}"
296
+ # docker_k8s_container: "k8s_deploy"
297
+ # docker_build_additional_args: "."
298
+ # docker_image_name: "${{ variables.docker_image_name }}"
299
+ # docker_image_tag: "${{ variables.docker_image_tag }}"
300
+ # docker_container_registry_name: "$(DOCKER_USERNAME)"
301
+ # # Azure
302
+ # azure_client_id: "$(ARM_CLIENT_ID)"
303
+ # azure_client_secret: "$(ARM_CLIENT_SECRET)"
304
+ # azure_tenant_id: "$(ARM_TENANT_ID)"
305
+ # azure_subscription_id: "$(ARM_SUBSCRIPTION_ID)"
306
+
307
+ # # Post build tasks, such as Test and Coverage upload, and publishing artefacts
308
+ # - template: templates/steps/build/post-build-tasks.yml
309
+ # parameters:
310
+ # project_root_dir: "${{ variables.self_project_dir }}"
311
+ # functional_test_project_root_dir: "${{ variables.self_functional_testproject_dir }}"
312
+ # # Build Output File
313
+ # # files to be persisted across stages
314
+ # build_file: true
315
+ # build_file_path: "${{ variables.build_artifact_deploy_path }}"
316
+ # build_file_artefact_name: "${{ variables.build_artifact_deploy_name }}"
317
+ # # Functional tests
318
+ # functional_test: ${{ variables.functional_test }}
319
+ # functional_test_artefact_name: "${{ variables.functional_test_artefact_name }}"
320
+ # functional_test_artefact_path: "${{ variables.functional_test_artefact_path }}"
321
+ # vulnerability_scan: "${{ variables.vulnerability_scan }}"
322
+ # vulnerability_scan_report: "${{ variables.vulnerability_scan_report }}"
323
+ # java_project_type: "${{ variables.java_project_type }}"
324
+ # functional_test_project_type: "${{ variables.functional_test_project_type }}"
324
325
325
326
- stage : Dev
326
327
dependsOn : Build
0 commit comments