Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,883
Community Members
 
Community Events
176
Community Groups

Migration from Bitbucket Services to Webhooks

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.


1 answer

0 votes

Hi @siddhesh.harmalkar ,

We are not deprecating services in Bitbucket Pipelines, so you don't need to take any action regarding Pipelines services.

The Services feature that we are deprecating is not related to Pipelines. It's a feature available from Repository settings of a repo (but only for older repos that already have services configured), which allowed users to set up e.g. email notifications, or a POST request to a service when the repo changes.

If you want to find which of your repos have such services set up, you can run the following API call:

https://api.bitbucket.org/2.0/repositories/{workspace}/?fields=values.services.*.*.*,values.full_name&role=admin

Replace {workspace} with the workspace-id of the workspace that owns your repos. After you get the repositories with services with this API call, you can open each repo on Bitbucket website, navigate to its Repository settings and you'll see an option Services.

Please note that we are not requiring repository admins to disconnect or remove existing Services; we are only suggesting migrating any Service functionality you wish to keep to webhooks:

You can also read more info on the following community article we published:

Services in Pipelines are not related to this feature, and you will still be able to use them. We apologize for the confusion caused by this.

If you have any questions, please feel free to let me know.

Kind regards,
Theodora

Hello Theodora and Bitbucket Team,

This resolved the query. Thanks for the response.

You are very welcome Siddhesh, I'm glad to have helped.

Please feel free to reach out if you ever need anything else.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events