Home > Enterprise >  Bitbucket pipelines configuration file error
Bitbucket pipelines configuration file error

Time:07-13

I'm new to bitbucket pipelines and I'm following this tutorial to deploy a react app to heroku.

enter image description here

CodePudding user response:

You have a problem with the indentation and BitBucket pipelines are sensitive on that. enter image description here

In the left is correct formatted pipeline and in the right is what you are currently using.

Please also see bellow fully formatted pipeline

image: node:14.18.0

pipelines:
  branches:
    main:
      - step:
          name: Create artifacts
          script:
          - git archive --format=tar.gz main -o application.tar.gz
          artifacts:
          - application.tar.gz
      - step:
          name: Deploy to production
          deployment: main
          caches:
          - node
          script:
          - pipe: atlassian/heroku-deploy:1.2.1
            variables:
              HEROKU_API_KEY: $HEROKU_API_KEY
              ZIP_FILE: application.tar.gz
    develop:
      - step:
          name: Create artifacts
          script:
          - git archive --format=tar.gz main -o application.tar.gz
          artifacts:
          - application.tar.gz
      - step:
          name: Deploy to production
          deployment: main
          caches:
          - node
          script:
          - pipe: atlassian/heroku-deploy:1.2.1
            variables:
              HEROKU_API_KEY: $HEROKU_API_KEY
              ZIP_FILE: application.tar.gz
  • Related