-5

I set this settings in pipelines in Bitbucket. Everything works well, but it doesn't look good when I commit every time Build. But when I don't make it. It says to me that I need to commit for the first time. Have someone best practice/experience?

bitbucket-pipelines.yml

# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.

pipelines:
  branches:
    production:
      - step:
          name: Build and deploy to FTP
          image: node:11.9.0
          caches:
            - node
          script:
            - npm install
            - npm run build
            - apt-get update 
            - apt-get -qq install git-ftp
            - git add /build
            - git commit -m "Build"
            - git push
            - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://someurl.com/
            - git rm /build
            - git commit -m "Remove build"
            - git push

Atef Ben Ali
  • 81
  • 2
  • 7
d3tr1tus
  • 789
  • 2
  • 10
  • 23

1 Answers1

0

If I understand properly what you are asking, you are on the page that shows the examples of templates and you are pressing the button "Commit file".

bitbucket-pipelines.yaml

It is kind of confusing what you should do, here, indeed, but actually what you should do is to have a file called bitbucket-pipelines.yaml containing your desired behavior in the root of your repository, and then, pipelines will do the job automatically based on the instructions in this file.

β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
  • No what I am asking is how can I build React App and via FTP send just folder content of folder named build. What I am making now is that I am sending production and developer folders. I made `bitbucket-pipelines.yaml` and in the text up is his content and its working automatically but that send all files. I need send just file which was builded. – d3tr1tus Mar 08 '19 at 12:59