使用BitBucket管道将React网站部署到Azure存储时出现问题

时间:2019-12-14 01:09:32

标签: azure yaml bitbucket azure-storage bitbucket-pipelines

我正在尝试构建一个React项目,并使用BitBucket管道部署到Azure存储。添加最后一行时出现错误:

- pipe: mspipes/azure-storage-deploy:2.0.0
     variables:
     SOURCE: 'upload'
     DESTINATION: $AZURE_DESTINATION
     DESTINATION_SAS_TOKEN: $AZURE_STORAGE_SAS_TOKEN
     DEBUG: 'true'

enter image description here

但实际上没有突出显示!

完整脚本:

image: node: 10.15.3

pipelines:
  default:
    -step:
        name: Build React Project
        script:
          -npm install
          - npm run - script build
          - mkdir packaged
          - tar - czvf packaged / package -${ BITBUCKET_BUILD_NUMBER}.tar.gz - C build.
        artifacts:
          -packaged/**
    - step:
        name: Deploy to Azure Storage Account
        script:
          - mkdir upload
          - tar -xf packaged/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C upload
          - pipe: mspipes/azure-storage-deploy:2.0.0
              variables:
              SOURCE: 'upload/'
              DESTINATION: $AZURE_DESTINATION
              DESTINATION_SAS_TOKEN: $AZURE_STORAGE_SAS_TOKEN
              DEBUG: 'true'

1 个答案:

答案 0 :(得分:0)

带有“变量:”的行缩进了两个空格,太多了...应与上方的工作管对齐。