Forums

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

Bitbucket Pipeline does not trigger on push

Lav Shah
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!
January 28, 2022

I have the following Bitbucket Pipeline in place.
But whenever I push to the master branch it does not trigger the pipeline.

I need to manually trigger the pipeline, and if I do so it works fine. But I want to make sure on every commit it triggers the pipeline automatically.

Content of bitbucket-pipelines.yml
Note: The code below is valid & have checked it here


image: node:16

pipelines:
branches:
default:
- step:
name: Build & Deploy to netlify
caches:
- node
script:
- npm install
- npm run lint
- npm run build-prod
- apt-get update
- apt-get install zip
- ls -a
- cd out
- zip -r build.zip *
- zip -sf build.zip
- curl --location --request POST "URL" --header "Content-Type:application/zip" --header "Authorization:Bearer Token" --data-binary "@build.zip"





Bitbucket-Pipelines-Validator.png
I've pipelines enabled as well, you can check that here:
front-end-Settings-—-Bitbucket.png
Also here are the request logs for the PUSH trigger of bitbucket.
 front-end-—-Bitbucket.png

3 answers

1 accepted

0 votes
Answer accepted
Lav Shah
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!
February 3, 2022

UPDATE:

Sometimes pipelines trigger with delay, so be patient with that and see after a few minutes, and in case of active bitbucket incidents, you can wait for it to get fixed.

- Pipeline started triggering automatically the day after.

That was strange and I also tried creating a new repository, but it didn't work there as well.

1 vote
Pramodh M
Community Champion
January 28, 2022

Hi @Lav Shah 

Welcome to the Community!!

Go ahead and try this starter template

#  Template NodeJS build
#  This template allows you to validate your NodeJS code.
#  The workflow allows running tests and code linting on the default branch.

image: node:16
pipelines:
  default:
    - parallel:
        - step:
            name: Build and Test
            caches:
              - node
            script:
              - npm install
              - npm test
        - step:
            name: Code linting
            script:
              - npm install eslint
              - npx eslint .
            caches:
              - node

Thanks,
Pramodh

1 vote
Ankit Gupta January 28, 2022

Have you tried changing default to master?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events