Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change directory in pipe line bitbucket

My folder structure:

-backend
-frontend

My reactapp is placed in frontend directory.

image: node:10.15.3

pipelines:
  default:
    - step:
        caches:
          - node
        script: # Modify the commands below to build your repository.
          - yarn install
          - yarn test
          - yarn build

This one fails. How do I go to the frontend-directory to run this?

like image 298
Joe Avatar asked Jun 28 '19 08:06

Joe


1 Answers

Bitbucket Pipeline run in one bitbucket cloud server.

So, similar as using a local command line interface, you can navigate using comands like cd, mkdir.

image: node:10.15.3

pipelines:
  default:
    - step:
        caches:
          - node
        script: # Modify the commands below to build your repository.
          - cd frontend
          - yarn install
          - yarn test
          - yarn build
          - cd ../ #if you need to go back
    #Then,probably you will need to deploy your app, so you can use:
          - apt-get update
          - apt-get -qq install git-ftp
          - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD $FTP_HOST

If you need to test syntax of your yml file, try here

like image 178
Giovan Cruz Avatar answered Oct 22 '22 21:10

Giovan Cruz