-
Notifications
You must be signed in to change notification settings - Fork 15
/
bitbucket-pipelines.yml
41 lines (37 loc) · 1.55 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Template maven-build
# This template allows you to test and build your Java project with Maven.
# The workflow allows running tests, code checkstyle and security scans on the default branch.
# Prerequisites: pom.xml and appropriate project structure should exist in the repository.
image: maven:3.6.3
pipelines:
default:
- step:
name: Export/generate features from Xray cloud
caches:
- maven
script:
- mvn -B xray:export-features -Dxray.issueKeys=$issue_keys -Dxray.outputDir=features/ -Dxray.clientId=$client_id -Dxray.clientSecret=$client_secret --file pom.xml
- parallel:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B test verify -Dcucumber.plugin="json:report.json" -Dcucumber.features="features/" --file pom.xml
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
artifacts:
- report.json
- step:
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.5.1
- step:
name: Import results to Xray cloud
caches:
- maven
script:
- mvn -B xray:import-results -Dxray.clientId=$client_id -Dxray.clientSecret=$client_secret --file pom.xml