Forums

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

bitbucket pipeline yaml file not working

simone_gasparella
Contributor
October 29, 2021

Hi .. 

I have already a bitbucket yaml file working for compiling an embedded project ... 

I tried to run the compile step only for a specific branches .. 

But it is not working .. . 

How can I fix it ? 

 

Thanks a lot 

 

 

# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image:
  name: lpodkalicki/stm32-toolchain
  username: simogaspa84
  password: **************
  email: simogaspa84@gmail.com

pipelines:
   branches:
    '{master,feature/development}':
  default:
    - parallel:
      - step:
          name: 'Build and Test'
          script:
            - sed -i -E 's/[A-Z]:\\.*\\workspace_[^\\]+\\[^\\]+\\/..\//' Debug/makefile
            - make -C Debug all
      - step:
          name: 'Lint'
          script:
            - echo "Your linting"
      - step:
          name: 'Security scan'
          script:
            - echo "Your security scan goes here..."

    # The following deployment steps will be executed for each pipeline run. To configure your steps and conditionally deploy see https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/
    - step:
        name: 'Deployment to Staging'
        deployment: staging
        script:
          - echo "Your deployment to staging script goes here..."
    - step:
        name: 'Deployment to Production'
        deployment: production
        trigger: 'manual'
        script:
          - echo "Your deployment to production script goes here..."

 

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 3, 2021

Hi, @simone_gasparella

Thank you for reaching out to Atlassian Community!

I understand that you would like to run Pipelines on specific branches, but that is running on all branches, is that correct?

Checking the YML file you shared with us, it doesn’t seem to be valid as you are specifying "branches" and "default" in the same section.

Could you please remove the default word from the YML and see if the pipeline works for {master,feature/development} branches?

I hope this helps, but do let me know if you have any questions. 

Kind regards,
Caroline 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events