簡體   English   中英

鏡像:訪問失敗:/opt/atlassian/pipelines/agent/build/dist/*:沒有這樣的文件或目錄

[英]mirror: Access failed: /opt/atlassian/pipelines/agent/build/dist/*: No such file or directory

我是使用 bitbucket 管道的新手。 我有一個與將我的 dist 文件部署到 ftp 服務器相關的問題。 這是我嘗試部署項目時發生的錯誤“鏡像:訪問失敗:/opt/atlassian/pipelines/agent/build/dist/*:沒有這樣的文件或目錄”。 這是我的 bitbucket.yml 文件

 # Template NodeJS build # This template allows you to validate your NodeJS code. # The workflow allows running tests and code linting on the default branch. image: node:16 pipelines: branches: master: - step: name: Install dependencies caches: - node script: - npm install artifacts: - node_modules/** # Save modules for next steps - step: name: Build project caches: - node script: - npm run build artifacts: - dist/** # Save build for next steps - step: name: Deploy to Production trigger: manual deployment: Production script: - pipe: atlassian/ftp-deploy:0.3.7 variables: USER: $FTP_USERNAME PASSWORD: $FTP_PASSWORD SERVER: $FTP_HOST REMOTE_PATH: '/var/www/*******/booking.crt-minds.ru/' LOCAL_PATH: 'dist/*' EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore" # Ignore these

我試圖刪除 yml 中的 local_path 並查看發生了什么。 但首先我不明白我的管道是否可以訪問 ftp 服務器。 我怎樣才能檢查它? 那么我需要了解如何替換 ftp 服務器中的 dist 文件夾文件? 可能是我的 bitbucket.yml 文件配置不正確?

從管道的文檔中得知

LOCAL_PATH :要上傳的本地目錄的可選路徑。 默認${BITBUCKET_CLONE_DIR}

我敢打賭,它不是將您傳遞的值解釋為 glob 模式,而是字面意思是一個名為dist/*的文件夾

嘗試刪除/*

      - step:
          script:
            - pipe: atlassian/ftp-deploy:0.3.7
              variables:
                USER: $FTP_USERNAME
                PASSWORD: $FTP_PASSWORD
                SERVER: $FTP_HOST
                REMOTE_PATH: /var/www/site
                LOCAL_PATH: dist

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM