首页 > 解决方案 > 更改管道 bitbucket 中的目录

问题描述

我的文件夹结构:

-backend
-frontend

我的 reactapp 放在frontend目录中。

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

这个失败了。我如何去前端目录运行它?

标签: bitbucket-pipelines

解决方案


Bitbucket Pipeline 在一个 bitbucket 云服务器中运行。

因此,与使用本地命令行界面类似,您可以使用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

如果您需要测试 yml 文件的语法,请在此处尝试


推荐阅读