I need to upload to the server using ftp server but noting is uploaded what is the problem?
Any one can help?
Error
mirror: Access failed: /opt/atlassian/pipelines/agent/build/dist: No such file or directory
ls: cannot access 'build/web/': No such file or directory
Script
- step:
name: Install Flutter and Set Up Environment
script:
# Flutter and Dart are already included in the Docker image
- export PATH="$PATH:/sdks/flutter/bin"
# Check Flutter and Dart versions
- flutter --version
- dart --version
# Run flutter doctor to check for any additional setup required
- flutter doctor
- step:
name: Check Flutter Installation
script:
- flutter --version
- echo "Flutter is correctly installed and available."
- step:
name: Build Flutter Web Application
script:
# Set the PATH for the current session
- export PATH="$PATH:/sdks/flutter/bin"
# Clean build directories
- flutter clean
# Install packages
- GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa" flutter pub get
# Build the Flutter web app
- flutter build web --web-renderer canvaskit --release
# Check if the build output exists
- step:
name: Check Build Output
script:
- ls -la build/web/
- step:
name: Deploy Web Application to FTP Server
script:
- echo "Uploading files to FTP server...."
- pipe: atlassian/ftp-deploy:0.7.1
variables:
USER: '********'
PASSWORD: '********'
SERVER: '**********'
REMOTE_PATH: '/apachewebserver8.2\htdocs\ibs-cab-corp'
LOCAL_PATH: 'build/web'
mirror: Access failed: /opt/atlassian/pipelines/agent/build/dist: No such file or directory
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.7.1
INFO: Starting FTP deployment to *****/***/***/****...
mirror: Access failed: /opt/atlassian/pipelines/agent/build/build/web: No such file or directory
✔ Deployment finished.
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.7.1
INFO: Starting FTP deployment to **REMOTE_PATH***...
mirror: Access failed: /opt/atlassian/pipelines/agent/build/build/web: No such file or directory
✔ Deployment finished.
G'day, @Mohammad
The error indicates that the path or the directory does not exist in your build. I think the path is incorrect. You should just use the 'web' only path in this case because from the error, it looks like it tries to look for the following path:
/opt/atlassian/pipelines/agent/build/build/web
It should be:
/opt/atlassian/pipelines/agent/build/web
So you should change your pipe to the following:
script:
- echo "Uploading files to FTP server...."
- pipe: atlassian/ftp-deploy:0.7.1
variables:
USER: '********'
PASSWORD: '********'
SERVER: '**********'
REMOTE_PATH: '/apachewebserver8.2\htdocs\ibs-cab-corp'
LOCAL_PATH: 'web'
Let me know how it goes.
Regards,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.