【问题标题】:Cloud storage bitbucket pipeline ignores directories云存储 bitbucket 管道忽略目录
【发布时间】:2021-03-23 00:37:44
【问题描述】:

我有以下管道

image: node:10.15.3

pipelines:
  default:
      - step:
          name: Installing
          caches:
            - node
          script:
            - rm -rf package-lock.json
            - rm -rf node_modules
            - npm install
      - step:
          name: Build
          script:
            - npm install --production
          artifacts:
            - build/**
      - step:
          name: Deploying
          script:
          - pipe: atlassian/google-cloud-storage-deploy:0.4.5
            variables:
              KEY_FILE: $KEY_FILE
              PROJECT: $PROJECT
              BUCKET: 'bucketname'
              SOURCE: 'build'
              CACHE_CONTROL: 'max-age=30'
              ACL: 'public-read'

预期的行为是将所有内容部署在 build 文件夹中,但它会上传 build 文件夹本身,因此在我的存储中,有一个 build 文件夹,然后里面的所有内容......

我试过了

'build/**' 它只选择文件并忽略目录

'buuid/' 它的行为与 'build' 相同,选择构建目录及其目录和文件夹中的所有内容

'build/*' 它只选择文件并忽略目录

我怎样才能构建文件夹、文件和目录中的所有内容..

谢谢

【问题讨论】:

  • 您能补充更多细节吗?我完全不明白你的意思是:The expected behavior is to deploy everything inside the build folder, but it uploads the build folder itself so in my storage, there is a build folder then everything inside this...

标签: node.js google-cloud-storage continuous-deployment bitbucket-pipelines


【解决方案1】:

我发现了问题,它在管道内部,只有复制命令我删除了管道并使用 -r 显式写入以递归方式复制文件夹

【讨论】:

    猜你喜欢
    • 2017-03-29
    • 1970-01-01
    • 1970-01-01
    • 2020-01-14
    • 1970-01-01
    • 2018-11-20
    • 2021-08-15
    • 2023-02-17
    • 2018-10-24
    相关资源
    最近更新 更多