Skip to content

Commit

Permalink
Deploy step only for main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbenckhuijsen committed Mar 25, 2024
1 parent 672ca63 commit a4c98ba
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,40 @@

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:
default:
- parallel:
branches:
main:
- parallel:
- <<: *build-test
- <<: *security-scan
- step:
name: Build and Test
name: Deploy to repository
deployment: Production
trigger: manual
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
- 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: Deploy to repository
deployment: Production
trigger: manual
caches:
- maven
script:
- bash configure-maven.sh
- mvn -B deploy --file pom.xml
- bash configure-maven.sh
- mvn -B deploy --file pom.xml
default:
- parallel:
- <<: *build-test
- <<: *security-scan

0 comments on commit a4c98ba

Please sign in to comment.