-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
46 lines (41 loc) · 1.28 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
42
43
44
45
46
# 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
build-test: &build-test
step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
security-scan: &security-scan
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
pipelines:
branches:
main:
- parallel:
- <<: *build-test
- <<: *security-scan
- step:
name: Deploy to repository
deployment: Production
trigger: manual
caches:
- maven
script:
- bash configure-maven.sh
- mvn -B deploy --file pom.xml
default:
- parallel:
- <<: *build-test
- <<: *security-scan