Hello,
We are using Bitbucket pipelines as CI platform since a long time. We have configured a custom multistage pipelines in all the production ready repositories. We are using services feature from the Production ready infrastructure from Bitbucket for executing the test cases. We are using below services demons.
1. mongodb
2. mysql
3. rabbitmq
4. cassandra
5. docker
We have configure the pipeline structure in below manner :
image:
name: ECR Image:latest
aws:
access-key: $AWS_ACCESS_KEY_ID
secret-key: $AWS_SECRET_ACCESS_KEY
clone:
depth: full
definitions:
# Caching SonarCloud artifacts will speed up your build
caches:
sonar: ~/.sonar/cache
services:
mongo:
image: mongo:3.4-xenial
docker:
memory: 3072
steps:
- step: &sonarcloud
name: Build & Test project against sonarcloud
caches:
- sonar
script:
- npm install
- pipe: sonarsource/sonarcloud-scan:1.2.1
- pipe: sonarsource/sonarcloud-quality-gate:0.1.4
variables:
SONAR_TOKEN: ${SONAR_TOKEN}
- step: &unit-test-cases
name: Build and run Unit test cases
script:
- Execution Scripts
- npm run test
services:
- mongo
- step: &deployment-step
name: Deployment
image:
name: 616035352558.dkr.ecr.ap-south-1.amazonaws.com/ecr-pipe:latest
aws:
access-key: $AWS_ACCESS_KEY_ID
secret-key: $AWS_SECRET_ACCESS_KEY
services:
- docker
caches:
- docker
script:
- Deployment Scripts
pipelines:
default:
- parallel:
- step: *sonarcloud
- step: *unit-test-cases
branches:
development:
- parallel:
- step: *sonarcloud
- step: *unit-test-cases
- step:
<<: *deployment-step
deployment: Development
Since Bitbucket is officially planning to deprecate service feature from Dec 2021. We need to migrate to another methodology the continue with the pipelines. Kindly suggest the alternative method with which we can execute CI from Bitbucket pipelines without using the Services Feature. Expecting a example which will suit our use case.
Thanks.