1

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

1 Answers1

0

I think you simply need add to one line per step to indicate which deployment (test, staging or production) you wanna use, e.g.:

      - step:
         name: Deploy to prod
         deployment: production
PepeNietnagel
  • 230
  • 2
  • 10