Can't see bitbucket pipeline for a particular branch with a valid bitbucket-pipelines.yml file.

ayushya_peaas
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!
March 6, 2018

Hi all,

I can't see my bitbucket pipeline (or the on going build, I am viewing it in the "Pipelines" tab in the particular repostiory.) even with a valid bitbucket-pipelines.yml file. I used http://www.yamllint.com/ to confirm it is a valid bitbucket pipeline.

 

Below is my bitbucket-pipelines.yml, I committed this file to my BITBUCKET_PIPELINE branch only.

image: node:9.7.1
pipelines:
  branches:
    BITBUCKET_PIPELINE
  default:
    - step:
        name: Build
        script:
          - npm install
    - step:
        name: Deploy
        script:
          - echo Deploying .....
          - apt-get update
          - apt-get install ncftp
          - ncftpput -v -u "$FTP_USERNAME" -p "$FTP_PASSWORD" -R $FTP_HOST $FTP_SITE_ROOT public/*
          - echo Finished uploading /public/* files to $FTP_HOST$FTP_SITE_ROOT

Kindly help on this issue.  

1 answer

1 vote
Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

Hi,

Your bitbucket-pipelines YAML configuration file seems not to be correct. The branch definition needs to be a map (key:value). For example:

image: node:9.7.1
pipelines:
  branches:
    BITBUCKET_PIPELINE:
      - step: 
         name: Step name
         script:
           - echo Hello World...
  default:
    - step:
        name: Build
        script:
          - npm install
    - step:
        name: Deploy
        script:
          - echo Deploying .....
          - apt-get update
          - apt-get install ncftp
          - ncftpput -v -u "$FTP_USERNAME" -p "$FTP_PASSWORD" -R $FTP_HOST $FTP_SITE_ROOT public/*
          - echo Finished uploading /public/* files to $FTP_HOST$FTP_SITE_ROOT

Check our documentation for some more examples: https://confluence.atlassian.com/bitbucket/branch-workflows-856697482.html 

For validation purposes, you can also use our online validator to make sure that syntax is correct.

Regards,

Raul

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events