Hi, I've have two project on the my free bitbucket account.
Once the codes are compiled, I want to send them to another server. (.net core project)
But I have a 2 project. I wanna publish another location per folder.
This is possible?
My bitbucket-pipelines.yml is:
script:
- pipe: atlassian/ftp-deploy:0.2.1
variables:
USER: 'ftp-user-name'
PASSWORD: 'ftp-password'
SERVER: 'XX.XX.XX.XXXX'
REMOTE_PATH: '/www/1st-project'
LOCAL_PATH: '1st-project'
script:
- pipe: atlassian/ftp-deploy:0.2.1
variables:
USER: 'ftp-user-name'
PASSWORD: 'ftp-password'
SERVER: 'XX.XX.XX.XXXX'
REMOTE_PATH: '/www/2nd-project'
LOCAL_PATH: '2nd-project'
How can I do?
Hi Alexander, thank you for your response.
That answer is good enough for me. But there are issues I'm curious about. For example, this is a .net core project. I can publish this with visual studio. Visual Studio gives me compiled files.
I am then transferring those files to my ftp folder.
Can I use the same scenario? Where will my compiled publish files be? What file path do I use for the FTP deploy?
Thanks.
@[deleted] I don't have much experience with .net, however, it seems to me that this scenario is also fine. Your files should reside on your server under the folder that your specify via the REMOTE_PATH variable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I partially solved the problem. Had very little.
I am getting error when publishing to my ftp server.
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.2.1
INFO: Starting FTP deployment to XX.XX.XX.XX:/ftproot...
mirror: Access failed: /dist: No such file or directory
.
How can I do.
Yes, "dist" folder no such file, but where does deploy it?
pipelines:
default:
- step:
name: Build and deploy to test
image: microsoft/dotnet:sdk
script:
- export PROJECT_NAME=Client
- dotnet restore
- dotnet build $PROJECT_NAME
- dotnet publish $PROJECT_NAME --configuration Release --output /dist --verbosity normal
artifacts:
- dist/**
- step:
name: Deploy
script:
- pipe: atlassian/ftp-deploy:0.2.1
variables:
USER: 'user'
PASSWORD: 'xxxx'
SERVER: 'ip'
REMOTE_PATH: '/ftproot'
LOCAL_PATH: '/dist/'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, you should remove leading slash in LOCAL_PATH to be just dist/. Second, your files will be uploaded to the /ftproot directory as specified in the REMOTE_PATH.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting error while publishing.
mirror: Access failed: /opt/atlassian/pipelines/agent/build/dist: No such file or directory
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted] . Yes, this is totally possible and your pipe configuration are valid. Make sure the remote directories exist on your remote server. I would also recommend to use separate pipelines steps to upload your code to different location. Let me know if you have any further questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.