I am trying to make a bitbucket pipeline so I can deploy to three environments (Developing, production, testing).
I have this but it seems not to work as intended
image: maven:3.3.9
pipelines:
default:
- step:
name: Build and Test
script:
- mvn clean install
- mvn package
- step:
name: Deploy to production
script:
- -Dspring.profiles.active=production
- mvn clean install
- mvn deploy
- step:
name: Deploy to development
script:
- -Dspring.profiles.active=develop
- mvn clean install
- mvn deploy
- step:
name: Deploy to testing
script:
- -Dspring.profiles.active=test
- mvn clean install
- mvn deploy