Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

multiple microservice deployments from a monorepo

i am trying to build and deploy two separate microservices (api and client) from a monorepo.

 

i added four environments: api-qa, client-qa, api-prod, and client-prod.

 

definitions:
steps:
- step: &build-api
name: build-api
condition:
changesets:
includePaths:
- "shared/**"
- "api/**"
script:
- echo build api
- step: &build-client
name: build-client
condition:
changesets:
includePaths:
- "shared/**"
- "api/src/entities/**"
- "client/**"
script:
- echo build client

-
step: &deploy-api-qa
name
: deploy-api-qa
deployment: api-qa
condition:
changesets:
includePaths:
- "shared/**"
- "api/**"
script:
- echo deploy api to qa
- step: &deploy-client-qa
name: deploy-client-qa
deployment: client-qa
condition:
changesets:
includePaths:
- "shared/**"
- "api/src/entities/**"
- "api/**"
script:
- echo deploy client to qa

- step: &deploy-api-prod
name: deploy-api-prod
deployment: api-prod
trigger: manual
condition:
changesets:
includePaths:
- "shared/**"
- "api/**"
script:
- echo deploy api to prod
- step: &deploy-client-prod
name: deploy-client-prod
deployment: client-prod
trigger: manual
condition:
changesets:
includePaths:
- "shared/**"
- "api/src/entities/**"
- "api/**"
script:
- echo deploy client to prod

pipelines:
default:
- step: *build-api
- step: *build-client
- step: *deploy-api-qa
- step: *deploy-client-qa
- parallel:
- step: *deploy-api-prod
- step: *deploy-client-prod

this *almost* works.  i do end up with four different environments, however, the "promote" button acts weirdly.  there's no promote button on api-qa and the promote button on client-qa wants to promote to api-prod.

what am i doing wrong here?  thanks in advance.

2 answers

1 accepted

0 votes
Answer accepted
Florian PEREZ Community Leader Dec 08, 2021

Hello,

Since this question is very technical I suggest you to post this on the developper part of the forum:

https://community.developer.atlassian.com/

I think you'll get more answers and from a better quality!

Hope this help

Hi, Iantz moore

I have one query related to this. What I have to do if I want to re-use the deployment environments like TEST, STAGING & PROD, to deploy 20+lambdas. Should I have to define all these lambdas in definitions section of the pipeline?. Please suggest the best way to deploy into multiple environments in multiple times.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

129 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you