The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable pipeline for branches in upgraded version

Abhishek Pandey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2024

I have created a repo and brnahces and added yml file over there but pipeline is not running .

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Gajesh Bhat
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 29, 2024

To enable pipelines for branches in Bitbucket Pipelines, you need to ensure that the YAML configuration file (bitbucket-pipelines.yml) is correctly set up and that the branches you want to build are included in the configuration. Here's the step by step configuration.

1. Create a bitbucket-pipelines.yml File:
Ensure that your repository contains a file named bitbucket-pipelines.yml in the root directory. This file defines the build configuration for your pipelines.

2. Check Pipeline Configuration:
The bitbucket-pipelines.yml file should define the steps and conditions under which the pipeline should run. Here’s a basic example configuration:

pipelines:
  default:
    - step:
        name: Build and Test
        script:
          - echo "Building and testing..."
  branches:
    feature/*:
      - step:
          name: Build for Feature Branch
          script:
            - echo "Building for feature branch"

In this example:
- The default pipeline runs for all branches unless overridden.
- The branches section specifies pipelines for branches matching a pattern, like feature/*.

To learn more about supported branch workflows in Bitbucket pipelines in the documentation : https://confluence.atlassian.com/bitbucket/branch-workflows-in-bitbucket-pipelines-856697482.html

3. Ensure Branch Names Match Configuration:
The branch names in your repository must match the patterns defined in the bitbucket-pipelines.yml file. If you want the pipeline to run for a specific branch or set of branches, ensure that these branches are included in the configuration.

4. Enable Pipelines in Repository Settings:
- Go to your Bitbucket repository.
- Navigate to Repository settings (found in the left sidebar).
- Under Pipelines, ensure that pipelines are enabled. If they are disabled, you can enable them here.

5. Check for Pipeline Triggers:
- Pipelines can be triggered by pushes to the branch, pull requests, or other events depending on the configuration.
- Ensure that the events you expect to trigger the pipeline are properly defined in your YAML configuration

TAGS
AUG Leaders

Atlassian Community Events